Support » Plugin: Order Delivery Date for WooCommerce » Plugin not compatible with Afterpay Gateway for WooCommerce

  • Resolved hardik

    (@hardikp)


    Hello,

    I am using Afterpay payment gateway for my WooCommerce site. For that I am using used “Afterpay Gateway for WooCommerce” – https://wordpress.org/plugins/afterpay-gateway-for-woocommerce/.

    Order Delivery Date for WooCommerce plugin not capturing delivery date when payment goes with Afterpay. In short, delivery date not saving in order meta & emails.

    It is working fine paypal or COD payment methods.

    I have tried with latest WC and latest Order Delivery Date plugin but not saving delivery date.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support chetnapatel

    (@chetnapatel)

    Hi Hardik,

    I get your point and I am sorry that you faced such an issue with the plugin.

    I will install “Afterpay Gateway for WooCommerce” plugin on my website and will check whether the delivery date is saved or not. The same issue never reported by any of our customers.

    I will let you know exactly what’s going on and will give you an update on this case for sure by Monday as we will be on leave due to the weekend.

    Regards,
    Chetna Bhutka

    Diluen Cheong

    (@fireworkswebsites)

    @hardikp Ypu will have to use a workaround for now:

    In your functions.php file insert the following hooks:

    
    add_action('woocommerce_checkout_process', 'afterpay_post');
    function afterpay_post() {
        if(!session_id()) { session_start(); }
        if ($_POST['payment_method'] === 'afterpay') {
            $_SESSION['AFTERPAY'] = $_POST;
        }
    }
    
    add_action('woocommerce_checkout_update_order_meta', 'afterpay_delivery_date', 10, 1);
    function afterpay_delivery_date($order_id) {
        if(!session_id()) { session_start(); }
        if(isset($_SESSION['AFTERPAY'])) {
            $data = $_SESSION['AFTERPAY'];
            foreach($data as $k=>$v) {
                $_POST[$k] = $v;
            }
            unset($_SESSION['AFTERPAY']);
        }
    }
    

    Basically this just saves your checkout’s form data from the $_POST object into a session variable. When Afterpay redirects back to your site, the 2nd hook takes that session and extracts the data and reassigns it to the $_POST object. The Delivery Date plugin handles the rest.

    hardik

    (@hardikp)

    Hi @fireworkswebsites

    Thanks for your answer.

    Still this solution not working for me.
    I have tested with latest plugins & also tested with older version of plugins.

    Also, delivery date should be send to email notifications as well.

    Plugin Support chetnapatel

    (@chetnapatel)

    Hi @fireworkswebsites

    Thank you for sharing the solution here.

    Hi @hardikp,

    I have installed AfterPay Payment Gateway for WooCommerce plugin on my staging site but we are facing difficulties to setup it since we are based in India and I observed that AfterPay Payment gateway can be used for the limited country [ Screenshot: http://prntscr.com/nxhfuv ]

    So, can you drop your email on “support at tychesoftwares dot freshdesk dot com” where we can more communicate on it for more detail information and look into the issue on your website?

    Regards,
    Chetna Bhutka

    hardik

    (@hardikp)

    Hi @chetnapatel

    I have sent an email on mentioned address.

    Please check asap. It’s really urgent for me.

    Plugin Support chetnapatel

    (@chetnapatel)

    Hi Hardik,

    Yes, now the communication on this issue will continue on the ticket thread. We will sure try to give you the solution as soon as possible.

    Regards,
    Chetna Bhutka

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Plugin not compatible with Afterpay Gateway for WooCommerce’ is closed to new replies.