Notice: id est appelée de la mauvaise manière. Les propriétés du produit ne doivent pas être accessible directement. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/accesspress-parallax/page.php’), get_template_part, locate_template, load_template, require(‘/themes/accesspress-parallax/content-page.php’), the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, YITH_YWRAQ_Shortcodes->request_quote_page, wc_get_template, include(‘/plugins/yith-woocommerce-request-a-quote-premium/templates/request-quote.php’), wc_get_template, include(‘/plugins/yith-woocommerce-request-a-quote-premium/templates/request-quote-view.php’), WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong Veuillez lire Débogage dans WordPress (en) pour plus d’informations. (Ce message a été ajouté à la version 3.0.) in /home/sites/equipalg/public_html/site/wp-includes/functions.php on line 4778
ps: I use the plugin YITH WooCommerce Request A Quote Premium and WooCommerce
Any help or advice would be greatly appreciated!
2
Answers
For that you will need to use the global keyword first like
This notice gets thrown because you cant call a product’s id directly ever since woocommerce 3.0 (deprecated), you should get the product’s id by using the get_the_id() getter instead.