Abra por favor esto producto de ejemplo.
- Para insertar una tabla con las variables del producto, use el siguiente código en el archivo functions.php:1234567add_filter('woocommerce_after_add_to_cart_button', function() {global $product;if (is_object($product) AND $product->is_type('variable')) {echo do_shortcode("[woot_variations per_page=4 columns='thumbnail,pa_size,pa_color,price,add_to_cart']");}});
Las columnas de atributos son opcionales aquí. - Para insertar "Corazón, Galería, Botón emergente"a la página de un solo producto use codde y file functions.php:123456add_filter('woocommerce_product_meta_end', function() {echo '<br /><br />' . do_shortcode('[woot_favourites_single_btn]');echo '<br /><br />' . do_shortcode('[woot_gallery]');echo '<br /><br />' . do_shortcode('[woot_popup_iframe_button popup_page_link='https://demo.products-tables.com/wpform-contact-ask-me/' button_text='Send message to the product manager' popup_title='Popup header title' css_class='woot-btn']');echo '<br /><br /><br />' . do_shortcode("[woot_single_btn button_text='Extended information' css_class='woot-btn']").'<br />';});
- Table attachments placed directly on the text editor by shortcode [woot_attachments columns="title,file,description"]
- Pestañas: revisiones, información adicional, WOOT Cross Sells, WOOT Upsells, WOOT Related modificado y agregado por el siguiente código en el archivo functions.php:12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758add_filter('woocommerce_product_tabs', function ($tabs) {$tabs['reviews'] = array('title' => __('WOOT Reviews', 'woocommerce'),'priority' => 49,'callback' => function() {$product_id = get_the_ID();echo '<div id="reviews">' . do_shortcode("[woot_reviews id={$product_id}]") . '</div>';});$tabs['additional_information'] = array('title' => __('Additional information', 'woocommerce'),'priority' => 50,'callback' => function() {$product_id = get_the_ID();echo do_shortcode("[woot_single id={$product_id} columns='weight,height,width,pa_size,pa_color,gallery']");});$tabs['woot_cross_sells_tab'] = array('title' => __('WOOT Cross Sells', 'woocommerce'),'priority' => 50,'callback' => function() {$product_id = get_the_ID();echo do_shortcode("[woot_cross_sells id={$product_id}]");});$tabs['woot_upsells_tab'] = array('title' => __('WOOT UpSells', 'woocommerce'),'priority' => 50,'callback' => function() {$product_id = get_the_ID();echo do_shortcode("[woot_upsells id={$product_id}]");});/*$tabs['woot_grouped_tab'] = array('title' => __('WOOT Grouped', 'woocommerce'),'priority' => 50,'callback' => function() {$product_id = get_the_ID();echo do_shortcode("[woot_grouped id={$product_id}]");});*/$tabs['woot_related_tab'] = array('title' => __('WOOT Related', 'woocommerce'),'priority' => 50,'callback' => function() {$product_id = get_the_ID();echo do_shortcode("[woot_related id={$product_id}]");});return $tabs;});
Lea también:
