Ecomm - Troubleshooting

WooCommerce post webhook returns 405 error

Webhook triggers but returns error "Error 405--Method Not Allowed". This is due to the user agent being set to the WooCommerce default value "WooCommerce/<version_no> Hookshot (WordPress/<version_no>)" which is rejected by Netsuite.

  1. FTP into your wordpress account.
  2. Navigate to the "plugins" directory.
  3. Locate the woo-commerce directory and navigate to the "includes" directory.
  4. Edit the file 'class-wc-webhook.php'.  Locate the string 'sprintf( 'WooCommerce/%s Hookshot (WordPress/%s)', WC_VERSION, $GLOBALS['wp_version'] )' .
  5. Replace this string with 'Mozilla/5.0 (Windows NT x.y; WOW64; rv:10.0) Gecko/20100101 Firefox/10.0' . Please note that the quotation is part of the string.
  6. Save and upload your changes.