简体   繁体   中英

Woocommerce query var 'order-received' causes a 404 error when used on page

if i try to add query parameter (order-received) in order-received page in woocommerce. it gives me 404 error.url is like http://localhost/order-received/?js:order=269017&key=wc_order_09fU1jATKarrE&order-received=269017

order-received page is custom page in wp. which is used as thankyou page after place order. i need to set order-received parameter value to order id. ineed to solve error. PHP Notice: Undefined index: order-received in /wp-content/plugins/woocommerce-subscriptions/vendor/woocommerce/subscriptions-core/includes/gateways/paypal/class-wcs-paypal.php on line 51

If you want to add a new query param then you have to go to the plugin file you mentioned class-wcs-paypal.php and there must be all params are calling, if there is new one then you have to add check for that param.

Also its just a Notice, if you go to wp-config.php file and turn the WP Debug to false then it will not show.

// Enable WP_DEBUG mode false define( 'WP_DEBUG', false );

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM