Support » Plugin: PayPal for WooCommerce » woocommerce_review_order shortcode removed

  • Resolved Apprique

    (@apprique)


    Hi,
    If my shopper cancels a payment in PayPal he is returned to a page called “Checkout — Review Order” that displays a shortcode “[woocommerce_review_order]”. This shortcode used to be in your plugin until quite recently, but not anymore. What should I replace this with?

    Best regards,

    Maarten

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Oliver

    (@angelleyesupport)

    Hi @apprique,

    I m sorry for the inconvenience you have faced, Please note that we actually customised the order review page which was valid till 1.4.0; After that now this page is not existing anymore; Now we are using default WC review page. So to avoid this please change your cancel URL to checkout/ cart and things will start to work fine.

    Please check that and let me know if you still have any questions/queries.
    Cheers

    Apprique

    (@apprique)

    Hi Oliver,
    I have tried assigning the Checkout page, however it does not seem to work. When I inspect your code it seems there is a condition to look for an exact title match ‘Checkout’ on line 1075 of your main plugin file. However we renamed this page title ourselves. As a result it does not seem to work anymore. Would it be better to let your function match on the page selected in the settings, instead of on an exact name that might have been changed by the site owner?
    Best regards,
    Maarten

    Plugin Author angelleye

    (@angelleye)

    Hi Maarten,

    I’m a little confused. Are you choosing your Checkout page from the drop down that shows up in the Express Checkout settings?

    Apprique

    (@apprique)

    Yes, I am. And indeed when returning from PayPal via the Cancel button it returns to the page indicated, but there is no hint to the user that he needs to do something. Should there be a hint? Your code does show that if the title of the page is Checkout and something goes wrong, the title of that page is changed. This made me think it’s weird to hard code the title like that.

    My problem is solved. I change the setting to go back to Cart instead of Checkout. It still doesn’t show a hint like that the user has cancelled the PayPal transaction or something, but I now think that is not so necessary actually.

    Thank you for your great support!!! I have given the plugin a 5 star rating.

    Plugin Contributor Oliver

    (@angelleyesupport)

    Well, as per my knowledge there isn’t any thing hard coded to check the checkout page statically. But I will definitely take a deeper look at that and will see and make adjustments for this specific thing in our future updates. I really appreciate your concern and your valuable remarks for the plugin. Thank you very much
    Cheers

    Apprique

    (@apprique)

    On line 1070 of your main plugin file you have the following:

            public function angelleye_paypal_for_woocommerce_page_title($page_title) {
                if (sizeof(WC()->session) == 0) {
                    return $page_title;
                }
                $paypal_express_checkout = WC()->session->get( 'paypal_express_checkout' );
                if ('Checkout' == $page_title && !empty($paypal_express_checkout)) {
                    remove_filter('the_title', array($this, 'angelleye_paypal_for_woocommerce_page_title'));
                    return 'Review Order';
                } else {
                    return $page_title;
                }
            }

    The if statement compares a hard coded page_title. If someone renamed the page, this piece of code does not work. Or do I misunderstand it?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘woocommerce_review_order shortcode removed’ is closed to new replies.