Last active
February 2, 2022 19:35
-
-
Save ibndawood/d3533bd209c5dd3a3c3e50af79126c02 to your computer and use it in GitHub Desktop.
Electro - Always display attributes in Specifications tab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'woocommerce_before_single_product', 'ec_child_modify_display_specs_attr' ); | |
function ec_child_modify_display_specs_attr() { | |
global $post; | |
update_post_meta( $post->ID, '_specifications_display_attributes', 'yes' ); | |
} |
@Kocarik, please use this updated code
@ibndawood, Thank you very much! for this code!
@ibndawood
Hi,
when I use this code everything working fine till I try to upload products on bulk with the native woocommerce importer.
When I put the CSV file with the products and click on import button the upload job stuck and when I remove the code everything start working normal.
Can you please tell me from where this issue come?
Hello @drfranky1
I am sorry I do not what is the reason for the issue you've described. The code hook into woocommerce_before_single_product
action which is executed in frontend only and not during import.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I found one small bugs , if I import my product with attributes to shop with wp all import plugin then on single product page not show Specification tab or Aditional information tab.
I try add this code to my child theme, but still also Specification tab or Aditional information tab not show.