• Resolved Nisa

    (@nisa1301)


    Hi

    How to disable cancel request on view order pages?

    I already delete it at the back end file, but when the plugin is update, it overwrite my customization.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author rajeshsingh520

    (@rajeshsingh520)

    Hi,

    you can overwrite the WooCommerce view order page template in your theme and you can remove this action hook where this link is been shown

    template file to overwrite is templates\order\order-details.php

    View post on imgur.com

    Thread Starter Nisa

    (@nisa1301)

    hi,

    i have child theme, so i need to copy the removed action hook for order-details.php and locate it in my child theme?

    Plugin Author rajeshsingh520

    (@rajeshsingh520)

    In your child theme you will make a folder structure like below

    [your child theme]/woocommerce/order

    in this order folder you will copy the file woocommerce/templates/order/order-details.php

    and in this file order-details.php you will remove the action highlighted in the screenshot

    View post on imgur.com

    Thread Starter Nisa

    (@nisa1301)

    Hi,

    yes it work !

    one more, if i want to disable on thank you page ?

    Plugin Author rajeshsingh520

    (@rajeshsingh520)

    Upgrade to v1.2.34 (we have just released it)

    after that add this below line of code in your theme functions.php file after this you will not have to overwrite any template file and it will hide the cancel order link in View order and thank your page as well

    
    
    remove_action('woocommerce_order_details_after_order_table', ['pisol_corw_cancel_request','orderCancelRequestText'],9999);
    
    
    Thread Starter Nisa

    (@nisa1301)

    THANK YOU SO MUCH FOR YOUR HELP ! God bless.

    Plugin Author rajeshsingh520

    (@rajeshsingh520)

    Your welcome will be happy if you can review our plugin

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘HOW TO DISABLE CANCEL REQUEST ON VIEW ORDER PAGE’ is closed to new replies.