James Huff on "Function Needed Increase Price Output - Woocommerce Google Product Feed"

ساخت وبلاگ

I am utilizing the Woocommerce Google Product Feed Plugin. I already have another Plugin that is dynamically increasing the price of the Woocommerce Product without changing the price in the database.

However the Woocommerce Google Product Feed Plugin is pulling the price from the database. So I need to increase the price outputted by the Woocommerce Google Product Feed Plugin, for example 10%.

Here is what I have so far.

/**
* Price Change
*/
function retu_custom_price($price, $product) {
global $post, $blog_id;
$price = get_post_meta($post->ID, '_regular_price');
$post_id = $post->ID;
$price = ($price[0]*1.1);
retu $price;
}
add_filter('woocommerce_gpf_price', 'retu_custom_price', 11, 2);

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 318 تاريخ : شنبه 9 مرداد 1395 ساعت: 4:08