ehsan991
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Plugins
In reply to: [Wallet for WooCommerce] interfere with WoocommerceThe problem was solved with a small change
I put the code so that others can use it as well// 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() ) && get_post_status()!='private' ) { $is_purchasable = false; echo "already_purchased"; } return $is_purchasable; }Forum: Plugins
In reply to: [Wallet for WooCommerce] interfere with WoocommerceThank you very much, it was very helpful
But when the wallet-product is in the cart, the cart page does not opendebug.log:
#35 {main}
thrown in mywebsite/wp-content/plugins/woocommerce/includes/class-wc-cart.php on line 2032- This reply was modified 3 years, 11 months ago by ehsan991.
Forum: Plugins
In reply to: [Wallet for WooCommerce] interfere with WoocommerceI found that, this plugin use WooCommerce to charge wallets ( Private Product)
how can i change my code only for Public Products ?
Forum: Plugins
In reply to: [Wallet for WooCommerce] shortcode for transactions listawesome . thanks
Viewing 4 replies - 1 through 4 (of 4 total)