woocommerce

Woocommerce Shop show categories

丶灬走出姿态 提交于 2021-02-08 05:23:10
问题 I am new to wordpress so please still help with me if I get the language wrong. Using woocommerce to display a shop with variable products, I would like the shop link landing page to display the shop categories with the featured image of that category. My current shop page displays all products, with a pagination to other product pages and I cannot find the template for all products. When I go to shop page in wp-admin and click on the edit page it is empty, so am not sure how they are getting

jQuery / Javascript - Detect if WooCommerce store notice html is visible

久未见 提交于 2021-02-08 05:17:55
问题 I am looking for a way to determine with JavaScript / jQuery if the WooCommerce store notice is displayed. The HTML for the store notice looks like this... <p class="woocommerce-store-notice demo_store" style="display: block;"> This is a store notice </p> I have tried to do this using the following... jQuery(document).ready(function(){ if ( jQuery('.woocommerce-store-notice').css('display') == 'none') { console.log('Store Notice Hidden'); } else { console.log('Store Notice Visible'); } });

jQuery / Javascript - Detect if WooCommerce store notice html is visible

故事扮演 提交于 2021-02-08 05:17:46
问题 I am looking for a way to determine with JavaScript / jQuery if the WooCommerce store notice is displayed. The HTML for the store notice looks like this... <p class="woocommerce-store-notice demo_store" style="display: block;"> This is a store notice </p> I have tried to do this using the following... jQuery(document).ready(function(){ if ( jQuery('.woocommerce-store-notice').css('display') == 'none') { console.log('Store Notice Hidden'); } else { console.log('Store Notice Visible'); } });

display default variation price Woocommerce products

你。 提交于 2021-02-08 05:12:49
问题 I need to show default variation price in Woocommerce product. I find this post and code works. --> Woocommerce Show default variation price but thre is a problem : the backend is too slowly and the product page get error 504 gateway because the script think too long... the is any alternative solutions ? add_filter('woocommerce_variable_price_html', 'custom_variation_price', 10, 2); function custom_variation_price( $price, $product ) { foreach($product->get_available_variations() as $pav){

display default variation price Woocommerce products

风格不统一 提交于 2021-02-08 05:12:07
问题 I need to show default variation price in Woocommerce product. I find this post and code works. --> Woocommerce Show default variation price but thre is a problem : the backend is too slowly and the product page get error 504 gateway because the script think too long... the is any alternative solutions ? add_filter('woocommerce_variable_price_html', 'custom_variation_price', 10, 2); function custom_variation_price( $price, $product ) { foreach($product->get_available_variations() as $pav){

Disable editing specific admin custom fields in Woocommerce

坚强是说给别人听的谎言 提交于 2021-02-08 04:27:29
问题 I have some custom fields for my Woocommerce products inside my Inventory Tab using woocommerce_wp_text_input() function. I would like to add one more custom text field just for displaying a value for reference. I want to lock the textfield by default so as not to be able to write something in it. Is it possible? 回答1: Yes it is possible adding the as custom_attributes the readonly property in the field arguments array using: 'custom_attributes' => array('readonly' => 'readonly'), So your code

Woocommerce products editable by their author for specific user role

泪湿孤枕 提交于 2021-02-08 04:17:12
问题 I have different users registered on my WordPress website with different roles. Apart from the rest of users, I want to allow advertisers (users with advertiser role - advertiser is a custom role that I have created) to place their own products on my site and also manage them. But they need to be limited only to manage (create, edit and delete) their own products, not of others. So far, I have tried the following code but it seems to be not valid. I am sure I can accomplish my goal using pre

Customizing email subject with dynamic data in Woocommerce [closed]

懵懂的女人 提交于 2021-02-08 03:34:45
问题 Closed. This question needs debugging details. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . Improve this question Not a duplicate of Display order total with and without VAT in Woocommerce's order email notification. How can I customize the subject of the E-mail, (not the body. I know how to edit the variables in the body, but the same variables don't work in the subject for some reason). So

Customizing email subject with dynamic data in Woocommerce [closed]

那年仲夏 提交于 2021-02-08 03:34:31
问题 Closed. This question needs debugging details. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . Improve this question Not a duplicate of Display order total with and without VAT in Woocommerce's order email notification. How can I customize the subject of the E-mail, (not the body. I know how to edit the variables in the body, but the same variables don't work in the subject for some reason). So

Display a custom div block for woocommerce out of stock product variations

旧时模样 提交于 2021-02-08 03:32:30
问题 In Woocommerce, I'm trying to make a custom div container visible when a variation of variable product is out of stock, but available on backorder. So by default it's hidden. But when a customer selects a variation that's out of stock, but available on backorder, it will show the div blocks I've written. I've placed this div block inside the short description of the product, since that is the place where I want to have it visible when it is out of stock. Or at least, I want to have it above