Banner Logo

Be a part of the family: Connect, Receive Support,
Contribute, and Reap Abundant Rewards!

Plugin conflict with Woocommerce Smart Coupons

WCMp Advanced Frontend Manager

Resolved
Viewing 6 reply threads
  • Author
    Posts
    • #122211
      odedtalmon
      Participant

      Hello,
      A vendor is trying to add a tracking number for an order via the frontend manager. Once the form is submitted the action failed with the following error:

      [26-May-2021 12:39:05 UTC] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function WC_SC_Coupon_Message::wc_add_coupons_message_in_email(), 2 passed in /home/MY_USERNAME/public_html/MY_DOMAIN/wp-includes/class-wp-hook.php on line 292 and exactly 3 expected in /home/MY_USERNAME/public_html/MY_DOMAIN/wp-content/plugins/woocommerce-smart-coupons/includes/class-wc-sc-coupon-message.php:299
      Stack trace:
      #0 /home/MY_USERNAME/public_html/MY_DOMAIN/wp-includes/class-wp-hook.php(292): WC_SC_Coupon_Message->wc_add_coupons_message_in_email(Object(WC_Order), true)
      #1 /home/MY_USERNAME/public_html/nMY_DOMAIN/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
      #2 /home/MY_USERNAME/public_html/MY_DOMAIN/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
      #3 /home/MY_USERNAME/public_html/MY_DOMAIN/wp-content/plugins/dc-woocommerce-multi-vendor/templates/emails/vendor-notify-shipped.php(55): do_action('woocommerce_ema...', Object(WC_Order), true)
      #4 /home/MY_USERNAME/public_html/MY_DOMAIN/wp-content/plugins/woocommerce/inc in /home/nivboMY_USERNAMEkc/public_html/MY_DOMAIN/wp-content/plugins/woocommerce-smart-coupons/includes/class-wc-sc-coupon-message.php on line 299
      Copy

      Why does this message appear? what is the tracking number action actually doing and how is it related to coupons!?
      What should I do?
      Thanks

    • #122236

      Hi,
      The tracking feature is coming from wcmp plugin. There is no relation with the front-end manager. There is no such compatibility with woocmmerce smart coupon (third party WordPress plugin) plugin and wc marketplace plugin. What we understand from your error the issue is coming because our plugin and your coupon plugin are using the same name hook name (

      woocommerce_email_after_order_table
      Copy

      ). This may create this issue. But not quite sure( as we already said we don’t have any compatibility with this plugin ). So to further debug this issue you may ask your coupon plugin to change woocommerce_email_after_order_table this hook name or you can change woocommerce_email_after_order_table this hook name in our plugin also. If you want to change from our plugin then goto ftp–wp-content\plugins\dc-woocommerce-multi-vendor\templates\emails\vendor-notify-shipped.php then goto line no 55 and replace with the below code

      <?php do_action('wcmp_email_after_order_table', $order, true); ?>
      Copy

      Then check you are facing this again or not.

    • #122238
      odedtalmon
      Participant

      Hey Raju,
      Very nice observation, that solved the issue.
      In order to get this implemented now all I have to do is copy this template file to my child theme right?
      Thanks!

    • #122266

      Yes odedtalmon, you need to override the template in your child theme.

    • #122272
      odedtalmon
      Participant

      Amazing, thank you!

    • #122281

      I hope you are satisfied with our assistance and plugin. A 5/5 review here- https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/reviews/#new-post, would be a great way to share your experience with others.

      This motivates us to continue providing the best experience possible and also helps others know how WC-Marketplace can make their life easier.

    • #125495

      Hi, we haven’t heard back from you for a while. We presume this issue has been fixed.

      Please open another thread if you need any further help

Viewing 6 reply threads

The topic ‘Plugin conflict with Woocommerce Smart Coupons’ is closed to new replies.