Use ID as slug for product category by default in WooCommerce?
Use ID as slug for product category by default in WooCommerce?
Use ID as slug for product category by default in WooCommerce?
Going by your method I would suggest hooking into wp_footer as well, so that your script would be near the end of the body, that way it will be loaded after all DOM was loaded. add_action(‘woocommerce_ajax_added_to_cart’, ‘set_button_classes’); function set_button_classes () { add_action(‘wp_footer’, function () { echo “<script>document.getElementByClassName(‘added_to_cart wc-forward’).classList.add(‘ct-cart-item’, ‘ct-offcanvas-trigger’);</script>”; }); } You could also close … Read more
How to create a WooCommerce Product filter based on PHP foreach
WooCommerce – Child Category wont show, but Parent does
Displaying Woocommerce Product Attributes on single product page
Does this help? add_action( ‘save_post_product’, ‘sew_chg_status’, 10,2 ); function sew_chg_status( $post_id, $post ){ $product = new WC_Product( $post_id ); //create a WC product with post data if ( 0 < $_POST[‘_stock’] ){ // if data sent about stock by WC is strictly superior to 0 $product->set_status( ‘publish’ ); // change the product status } }
I am supprised that this question still accepts answers once woocommerce is a plugin and out of the scope of this chat. Anyhow for what I have understood you want to show the product title on the woocommerce breadcrumb, Woocommerce breadcrumb already does that by default, there is no need of any changes, just remove … Read more
Password protected selling / selling one product at the time
Unable to add product to the cart
Dokan stock management