0

using a plugin which lists the following as filters/hooks to append data:

// Data Filters
apply_filters('woocommerce_print_products_title', $this->post->post_title);
apply_filters('woocommerce_print_products_short_description', do_shortcode($this->post->post_excerpt));
apply_filters('woocommerce_print_products_price', $price);
apply_filters('woocommerce_print_products_description', $this->post->post_content);
apply_filters('woocommerce_print_products_meta_keys', $temp);
apply_filters('woocommerce_print_products_product_html', $this->get_first_layout(), $this->data->ID); 

// Custom HTML 
apply_filters('woocommerce_print_products_before_product_info_html', '', $this->data->ID); 
apply_filters('woocommerce_print_products_after_product_info_html', '', $this->data->ID); 

// HTML Strings
apply_filters('woocommerce_print_products_product_description_html', ob_get_clean(), $this->data->ID);
apply_filters('woocommerce_print_products_product_attributes_html', ob_get_clean(), $this->data->ID);
apply_filters('woocommerce_print_products_product_attributes_html', ob_end_clean(), $this->data->ID);
apply_filters('woocommerce_print_products_product_reviews_html', ob_get_clean(), $this->data->ID);
apply_filters('woocommerce_print_products_product_upsells_html', ob_get_clean(), $this->data->ID);
apply_filters('woocommerce_print_products_product_gallery_images_html', ob_get_clean(), $this->data->ID);
apply_filters('woocommerce_print_products_product_variations_html', ob_get_clean(), $this->data->ID);

i have an ACF field for products single with the name append_to_pdf_cut_sheet whose data i'd like to append for example to apply_filters('woocommerce_print_products_after_product_info_html', '', $this->data->ID);.

what i tried to no avail - total novice here:

$custom_field_value = get_field('append_to_pdf_cut_sheet', $this->data->ID);

if ($custom_field_value) {
    $custom_field_value = apply_filters('woocommerce_print_products_after_product_info_html', $custom_field_value, $this->data->ID);
    echo $custom_field_value;
}

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.