Declaring a new woo commerce product type i get this error

According to the class definition the constructor expects to receive either a product ID (integer) or a product instance (object). This leads me to believe WooCommerce expects the product to already exist. https://docs.woothemes.com/wc-apidocs/class-WC_Product.html Despite expecting an integer or object it appears that you can still create a new instance by simply passing null. <?php $pjb … Read more

Show pop up message for specific categoryies

1) Open your templates/content-product_cat.php file. 2) Locate the following piece of code: <li <?php wc_product_cat_class(); ?>> <?php do_action( ‘woocommerce_before_subcategory’, $category ); ?> <a href=”https://wordpress.stackexchange.com/questions/204313/<?php echo get_term_link( $category->slug,”product_cat’ ); ?>”> 3) Replace the line <a href=”https://wordpress.stackexchange.com/questions/204313/<?php echo get_term_link( $category->slug,”product_cat’ ); ?>”> for the following piece of code: <?php if ($category->name == “adults1” || $category->name == “adults2”) … Read more

Modify WooCommerce email shipping text value

FIXED IT I was able to fix my function and it now works how intended. This is the working function and filter in case anyone wants to use. This will return custom text when flat rate shipping is free. /* return custom text on email when shipping is free */ add_filter( ‘woocommerce_order_shipping_to_display’, ‘filter_email_shipping_text’, 10, 2 … Read more