Rules
Wrong price in bulk table if coupon replacement active
You need to paste the following code in the functions.php of your theme:
1 |
add_filter('adp_show_bulk_table_prices_including_coupons', '__return_true'); |
But the total price and price for 1 unit on the product page will be incorrect. It’s a normal behaviour with this hook.
How does the plugin calculate product price on category/product page?
We put ONE product to current cart, apply rules to the cart and use modified price. Pro version supports option “Displayed product price ignores the cart”. In this case – we put the product to empty cart. You can find a detailed description of this option here.
Why do I see the same price in bulk table?
It appears because your product has a sale price is lower than discounted regular price and you use the “Best between discounted regular price and sale price” mode (Pricing rules > Settings > Calculation > How to apply rules to a product that already has a sale price).
Why I don’t see bulk table if product is out of stock
Case “Out of stock – no backorders – no bulk table”. WooCommerce doesn’t call default hook for “Out of stock” case. You should start Customizer. Select Product Bulk Table > Options and set position = “Above product meta”.
Customers cheat condition “payment method”
For example, you setup rule is that if users pay with paypal or credit card – they get -5%. A customer tried to pay with card, it wasn’t successful and after that he paid with cash on delivery, but he get the discount still.
WooCommerce allows to change payment for existing (and unpaid) order. Use following PHP code to disable this feature.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
add_action('before_woocommerce_pay', function() { $order_key = isset( $_GET['key'] ) ? $_GET['key'] : null; if ( ! $order_key ) { return; } $order_id = wc_get_order_id_by_order_key( $order_key ); $order_id = absint( $order_id ); $order = wc_get_order($order_id); if ( ! $order ) { return; } $payment_method = $order->get_payment_method(); add_filter( 'woocommerce_available_payment_gateways', function ( $gateways ) use ( $payment_method ) { return isset( $gateways[ $payment_method ] ) ? array( $payment_method => $gateways[ $payment_method ] ) : array(); }, 10, 1 ); }); |
How to customize bulk tables
You should copy necessary files from folder “templates” to folder “advanced-dynamic-pricing-for-woocommerce” (create it in active theme).
The rules are not applied to orders if I use button “Add order” (“WooCommerce” – “Orders”)
This form adds new order directly to the database. But all pricing plugins work with cart items. Use our plugin “Phone Orders” to add backend orders.
I can’t translate bulk table message using WPML
You must turn on 2 checkboxes:
- Allow WPML to translate dynamic phrases, see link .
I need custom cart condition
You should be PHP programmer to do it. Please, review sample addon and adapt it for your needs.