Hi. I'd like to display this button if the product is set to not in stock on certain hours. Is it possible to check in code whether the product is affected by this rule
or is it checked by any rule in WPC product timer, so I could display this button. This is the only time range I want to hide lunch meals
Can you please answer on dev email [email protected], as he is responsible for this functionality
We can't change the button text. However, I have an alternative solution is using a shortcode. Please add the below custom code (How to add custom code?):
add_shortcode( 'wpc_unpurchasable_message', function () {
global $product;
if ( $product && ( ! $product->is_purchasable() || ! $product->is_in_stock() ) ) {
return '<p style="color: red">This product is no longer available.</p>';
}
return null;
} );
Then use the shortcode [wpc_unpurchasable_message] where you want to display the message. Maybe right above the add-to-cart button.
If it still doesn't work, please send me your website credentials (wp-admin link, username, password) then I can check and fix it for you. You also can create a dev/staging site with the same configurations then I'll work on it.
Hi. I'd like to display this button if the product is set to not in stock on certain hours. Is it possible to check in code whether the product is affected by this rule
or is it checked by any rule in WPC product timer, so I could display this button. This is the only time range I want to hide lunch meals
Can you please answer on dev email [email protected], as he is responsible for this functionality
Hi Mykhailo,
Thank you for contacting WPClever Support Forum.
We’ve received your ticket and assigned one of our developers to help you with that.
He’ll be looking into your request to see if this is feasible or not and responding with specific instructions as soon as possible.
Please stay patient as we're having very heavy workloads, it might take some time for our developers to reach back.
Best regards.
Janilyn T. - WPClever Support Agent
Hi Mykhailo,
We can't change the button text. However, I have an alternative solution is using a shortcode. Please add the below custom code (How to add custom code?):
Then use the shortcode [wpc_unpurchasable_message] where you want to display the message. Maybe right above the add-to-cart button.
If it still doesn't work, please send me your website credentials (wp-admin link, username, password) then I can check and fix it for you. You also can create a dev/staging site with the same configurations then I'll work on it.
Best regards,
Dustin