Applying coupon fail 1.6.5
-
Hello,
I am using version 1.6.5 of the plugin and since I installed it, the coupon code are not working. I get this error message in my log:
PHP Fatal error: Call to undefined method WC_Coupon::get_ID() in /var/www/html/xxxxxxxxxxxxxxxxxxxxxxx.ca/wp-content/plugins/perfect-woocommerce-brands/classes/admin/class-pwb-coupon.php on line 48, referer: https://www.xxxxxxxxxxxxxxxxxxxxxxx.ca/cart/
I modified the line 48 of function is_valid_coupon. With this modification, it is working.
BEFORE
$selected_brands = get_post_meta( $coupon->get_ID(), '_pwb_coupon_restriction', true );
AFTER
$selected_brands = get_post_meta( $coupon->id, '_pwb_coupon_restriction', true );
System status report
Array ( [home_url] => https://www.xxxxxxxxxxxxxxxxxxxxxxx.ca [site_url] => https://www.xxxxxxxxxxxxxxxxxxxxxxx.ca [version] => 2.6.14 [wp_version] => 4.5.3 [wp_multisite] => [wp_memory_limit] => 1024M [wp_debug_mode] => [wp_cron] => 1 [language] => fr_FR [server_info] => Apache/2.4.29 (Ubuntu) [php_version] => 5.6.37-1+ubuntu18.04.1+deb.sury.org+1 [php_post_max_size] => 8M [php_max_execution_time] => 300 [php_max_input_vars] => 1000 [max_upload_size] => 2097152 [default_timezone] => UTC [theme] => Array ( [name] => X - La Shop - child [version] => 1.0.0 [parent_theme] => X ) [active_plugins] => Array ( [0] => contact-form-7/wp-contact-form-7.php [1] => cornerstone/cornerstone.php [2] => duplicate-post/duplicate-post.php [3] => easy-wp-smtp/easy-wp-smtp.php [4] => google-analytics-dashboard-for-wp/gadwp.php [5] => js_composer/js_composer.php [6] => menu-limit-detector/menu-limit-detector.php [7] => perfect-woocommerce-brands/main.php [8] => shortcode-pagination-for-woocommerce/jck-woo-shortcode-pagination.php [9] => the-grid/the-grid.php [10] => ubermenu/ubermenu.php [11] => woocommerce-extra-product-sorting-options/woocommerce-extra-product-sorting-options.php [12] => woocommerce-menu-bar-cart/wp-menu-cart.php [13] => woocommerce-similar-category-products-widget/woocommerce-silmilar-category-products-widget.php [14] => woocommerce/woocommerce.php [15] => wordpress-seo/wp-seo.php [16] => wp-all-import-pro/wp-all-import-pro.php [17] => wpai-woocommerce-add-on/wpai-woocommerce-add-on.php [18] => x-email-mailchimp/x-email-mailchimp.php [19] => x-under-construction/x-under-construction.php ) [pwb_options] => Array ( [version] => 1.6.5 [wc_pwb_admin_tab_brand_single_position] => after_meta [old_wc_pwb_admin_tab_slug] => marques [wc_pwb_notice_plugin_review] => [wc_pwb_admin_tab_slug] => marques [wc_pwb_admin_tab_brand_desc] => yes [wc_pwb_admin_tab_brand_single_product_tab] => yes [wc_pwb_admin_tab_brands_in_loop] => no [wc_pwb_admin_tab_brands_in_single] => brand_image [wc_pwb_admin_tab_brand_logo_size] => thumbnail ) )
- The topic ‘Applying coupon fail 1.6.5’ is closed to new replies.