• Resolved humblebeemediahive

    (@humblebeemediahive)


    I think there is a conflict with the Advanced dynamic pricing for woocommerce plugin. When this is active, the gift card amount is displayed in the cart, but the total does not subtract the gift card and neither does the payment.
    But when the dynamic pricing plugin is deactivated, it works fine.
    How can I fix this?
    Is this a problem that you devs are aware of?
    Thank you

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hello there,

    hope you are doing well 🙂

    Could you check if adding the following code to the functions.php file of your active theme the issue is solved, please?

    if ( ! function_exists( 'ywgc_apply_discount_cart' ) ) {
       function ywgc_apply_discount_cart( $priority ) {
          $priority = 10;
    
          return $priority;
       }
    
       add_filter( 'wdp_calculate_totals_hook_priority', 'ywgc_apply_discount_cart' );
    }

    If not is solved, you should contact Advanced Dynamic Pricing for Woocommerce support, so, maybe they are blocking the use of a gift card when applying discount rules.

    Let us know any news, please.

    Have a nice day!

    • This reply was modified 3 years, 3 months ago by YITHEMES.

    SHORT VERSION: The code above appears to work.

    I was having the same problem and just happened to stumble upon this thread.

    I’m also using Advanced Dynamic Pricing for Woocommerce along with the Yith Woocommerce Gift Cards plugin.

    Earlier today, someone bought a $400 item on my Website and applied THREE different $50 gift cards to the purchase, which should have dropped the total amount owed at checkout to $250.

    Woocommerce correctly showed that the three cards were applied to the purchase, but then did not subtract the $150 in gift cards from the total price.

    It showed that the customer still owed $400, but in the YITH Gift Cards dashboard, the three gift cards that the customer used at checkout all showed a balance of $0.

    So the value of the gift cards was correctly deducted from the card balance, as though the cards had been used, but that amount was not deducted from the purchase price at checkout.

    The customer, understandably confused, paid in full and I manually refunded $150 to them…

    …and then did a Web search and found this post.

    I added the suggested code above to my functions.php file and did a single test, buying a $10 gift card and then making a purchase of an item that was discounted from $4 to $3 by the Advanced Dynamic Pricing for Woocommerce Plugin.

    I entered the gift card code at checkout.

    The transaction went through properly, with the amount of the purchase properly deducted from the gift card.

    As the value of the test gift card ($10) exceeded the price of the item being purchased ($3), the test buyer was not asked to pay and the total purchase price was fully deducted from the gift card balance.

    Examining the order in my order dashboard, the item shows as being paid in full via the gift card alone. In the YITH Gift Cards dashboard, the gift card shows a remaining balance that correctly reflects the amount deducted for the test purchase.

    All good; the code above seems to work.

    Thank you.

    I was having the same problem and just happened to stumble upon this thread.

    I’m also using Advanced Dynamic Pricing for Woocommerce along with the YITH Woocommerce Gift Cards plugin.

    Earlier today, someone bought a $400 item on my Website and applied THREE different $50 gift cards to the purchase, which should have dropped the total amount owed at checkout to $250.

    Woocommerce correctly showed that the three cards were applied to the purchase, but then did not subtract the $150 in gift cards from the total price.

    It showed that the customer still owed $400, but in the YITH Gift Cards dashboard, the three gift cards that the customer used at checkout, which all previously had a balance of $50, now all showed a balance of $0.

    So the value of the gift cards was correctly deducted from the card balance, as though the cards had been used, but that amount was not deducted from the purchase price at checkout.

    The customer, understandably confused, paid in full and I manually refunded $150 to them…

    …and then did a Web search and found this post.

    I added the suggested code above to my functions.php file and did a single test, buying a $10 gift card and then making a purchase of an item that was discounted from $4 to $3 by the Advanced Dynamic Pricing for Woocommerce Plugin.

    I entered the gift card code at checkout.

    The transaction went through properly, with the amount of the purchase properly deducted from the gift card.

    As the value of the test gift card ($10) exceeded the price of the item being purchased ($3), the test buyer was not asked to pay and the total purchase price was fully deducted from the gift card balance.

    Examining the order in my order dashboard, the item shows as being paid in full via the gift card alone. In the YITH Gift Cards dashboard, the gift card shows a remaining balance that correctly reflects the amount deducted for the test purchase.

    All good; the code above seems to work.

    Thank you.

    • This reply was modified 3 years, 3 months ago by essmeier.
    • This reply was modified 3 years, 3 months ago by essmeier.
    • This reply was modified 3 years, 3 months ago by essmeier.
    • This reply was modified 3 years, 3 months ago by essmeier.
    • This reply was modified 3 years, 3 months ago by essmeier.
    Plugin Author YITHEMES

    (@yithemes)

    Hi there,

    Seem that the problem is solved, so we will mark the topic as solved but feel free to open a new one if you have any other issues.

    If you enjoy our support, we will really appreciate if you can leave us a review and a five stars rating -> https://wordpress.org/support/plugin/yith-woocommerce-gift-cards/reviews/

    Many thanks and have a nice day!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Conflict with Advanced Dynamic Pricing for Woocommerce’ is closed to new replies.