How to hide WooCommerce product title and short description to non logged in users?

Your $description is shown because you concatenated it is your condition in $description = ‘ ‘ . sprintf( __( “To check if this item qualifies for a discount %s an account.”), ” . __(“Log In or Create”) . ” ) . ‘ ‘ . $description; Does the below code helps ? add_filter( ‘woocommerce_short_description’, ‘add_text_before_short_description_for_guests’ ); … Read more

How to automatically change the status of product from draft to published when stock qty change from 0 > 1

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 } }

How to add woocommerce products header title in woocommerce_breadcrumb hook to function.php

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