interfere with Woocommerce
-
Hello ,
I used a part of Code for Once-Buy in my shop
// Deny purchase if already purchased add_filter( 'woocommerce_is_purchasable', 'deny_purchase_if_already_purchased', 9999, 2 ); function deny_purchase_if_already_purchased( $is_purchasable, $product ) { if ( is_user_logged_in() && wc_customer_bought_product( '', get_current_user_id(), $product->get_id() ) ) { $is_purchasable = false; echo "already_purchased"; } return $is_purchasable; }
and in woocommerce it works well
but woo-wallet gets in trouble & The wallet can no longer be charged
— after click on Topup i see a message {already_purchased}Please Help me
Thanks
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘interfere with Woocommerce’ is closed to new replies.