-1
저는 PHP와 WooCommerce에 완전히 익숙하지 않기 때문에 매우 간단한 질문 일 수 있습니다. 그러나 'WooCommerce PDF Watermark'플러그인을 사용하면 내 워드 프레스 사이트 주문. 나는 이것을위한 코드를 바로 얻을 수 없다. 플러그인과 함께 제공되는 설명서는 플러그인에 템플릿 태그를 추가하는 방법에 대한 아래의 예제를 제공합니다. 어떤 도움이라도 대단히 감사하겠습니다!woocommerce의 주문에서 qty를 호출합니다. pdf 워터 마크
function wc_pdf_watermark_extend_template_tags($parsed_text, $unparsed_text, $order, $product) {
// Look for {product_title} in text and replace it with the product title
$parsed_text = str_replace('{product_title}', $product->get_title(), $parsed_text);
return $parsed_text;
}
add_filter('woocommerce_pdf_watermark_parse_template_tags', 'wc_pdf_watermark_extend_template_tags');
귀하의 요구 사항을 좀 더 자세히 설명 할 수 있습니까? –