Woocommerce Product Default Description for All Pr

2019-09-01 02:05发布

Is this possible to add Woocommerce Product Default Description for All Products page. That should be image or Note text. And I want It will be put in above or bottom of the description text.

Thanks in advance

1条回答
Melony?
2楼-- · 2019-09-01 02:25

you can use hooks like

// define the woocommerce_single_product_summary callback function
function my_custom_action() { 
    echo '<p>This is my custom action function</p>';
};     
add_action( 'woocommerce_single_product_summary', 'my_custom_action', 15 );

or woocommerce_after_single_product_summary

// define the woocommerce_after_single_product_summary callback 
function action_woocommerce_after_single_product_summary( $evolve_woocommerce_after_single_product_summary, $int ) { 
    // make action magic happen here... 
}; 

// add the action 
add_action( 'woocommerce_after_single_product_summary', 'action_woocommerce_after_single_product_summary', 10, 2 );  

or woocommerce_before_single_product_summary

// define the woocommerce_before_single_product_summary callback 
function action_woocommerce_before_single_product_summary( $woocommerce_show_product_sale_flash, $int ) { 
    // make action magic happen here... 
}; 

// add the action 
add_action( 'woocommerce_before_single_product_summary', 'action_woocommerce_before_single_product_summary', 10, 2 );

or you may also change direct on woo-commerce files.

查看更多
登录 后发表回答