woocommerce_before_shop_loop_item_title action not working on search results
-
### WordPress Environment ### Home URL: https://laiamartinmakeup.com Site URL: https://laiamartinmakeup.com WC Version: 2.6.4 Log Directory Writable: ? WP Version: 4.6.1 WP Multisite: – WP Memory Limit: 192 MB WP Debug Mode: – WP Cron: ? Language: es_ES ### Server Environment ### Server Info: Apache PHP Version: 5.6.7 PHP Post Max Size: 15 MB PHP Time Limit: 30 PHP Max Input Vars: 1000 cURL Version: 7.26.0 OpenSSL/1.0.1t SUHOSIN Installed: ? MySQL Version: ? 5.5.53 - Recomendamos como versión mínima de MySQL la 5.6. Ver: Requisitos de WordPress Max Upload Size: 15 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Publicación remota: ? Obtención remota: ? ### Database ### WC Database Version: 2.6.4 : woocommerce_sessions: ? woocommerce_api_keys: ? woocommerce_attribute_taxonomies: ? woocommerce_downloadable_product_permissions: ? woocommerce_order_items: ? woocommerce_order_itemmeta: ? woocommerce_tax_rates: ? woocommerce_tax_rate_locations: ? woocommerce_shipping_zones: ? woocommerce_shipping_zone_locations: ? woocommerce_shipping_zone_methods: ? woocommerce_payment_tokens: ? woocommerce_payment_tokenmeta: ? ### Active Plugins (23) ### PW Advanced Woo Reporting: por Proword – 3.0 Advanced Custom Fields PRO: por Elliot Condon – 5.4.8 Antispam Bee: por pluginkollektiv – 2.6.9 Contact Form 7: por Takayuki Miyoshi – 4.5.1 Duplicar publicación: por Enrico Battocchi – 3.0.1 Enable Media Replace: por M?ns Jonasson – 3.0.5 Export User Data: por Q Studio – 1.3.1 Google Analytics: por Kevin Sylvestre – 1.0.7 JC WooCommerce Advanced Attributes: por James Collings – 1.4.0 Jetpack por WordPress.com: por Automattic – 4.3.2 WooCommerce Product Filter: por Mihajlovic Nenad – 5.4.0 Quick Page/Post Redirect Plugin: por anadnet – 5.1.8 Relevanssi: por Mikko Saari – 3.5.4 User Admin Simplifier: por Adam Silverstein – 0.6.4 Woocommerce advance reporting: por Webnware – 1.0.1 Woocommerce Advanced Bulk Edit: por George Iron – 3.8.1 WooCommerce Extended Coupon Features PRO: por Jos Koenis – 2.3.4 WooCommerce PDF Invoice: por RightPress – 3.0.2 WooCommerce Stock Manager: por Vladislav Musílek – 1.1.1 WooCommerce Table Rate Shipping: por Bolder Elements – 3.6.5 WooCommerce: por WooThemes – 2.6.4 Yoast SEO: por Equipo Yoast – 3.7.0 WP Migrate DB: por Delicious Brains – 0.8 ### Settings ### Force SSL: – Currency: EUR (€) Currency Position: right Thousand Separator: . Decimal Separator: , Number of Decimals: 2 ### API ### API Enabled: ? ### WC Pages ### Base de la tienda: #5149 - /tienda/ Carrito: #5035 - /carro/ Finalizar compra: #5036 - /finalizar-comprar/ Mi cuenta: #5037 - /mi-cuenta/ ### Taxonomies ### Product Types: external (external) grouped (grouped) simple (simple) variable (variable) ### Theme ### Name: Laia Version: 1.0.0 Author URL: Child Theme: ? Parent Theme Name: wp-bootstrap Parent Theme Version: 3.3.1 Parent Theme Author URL: https://cbarn.es WooCommerce Support: ? ### Templates ### Overrides: Tu tema tiene un archivo woocommerce.php no podrás sobreescribir la plantilla personalizada woocommerce/archive-product.php ya que woocommerce.php tiene prioridad sobre archive-product.php. Esto es intencionado para prevenir problemas de visualización. Overrides: laia/woocommerce/archive-product.php laia/woocommerce/content-product.php laia/woocommerce/content-single-product.php laia/woocommerce/emails/customer-completed-order.php laia/woocommerce/emails/email-styles.php
Hi, and thanks for reading.
We created an action to customize the product appearance to display the short description on mouse over the product thumbnail. If the short description is empty then it only shows “view product”. The action works well on all site except on search results.
function mywp_product_hover() { global $post; if( ! has_excerpt() ) { $minides = '?View product!'; } else { $minides = $post->post_excerpt; } echo '<div class="overlay">' . $minides . '</div>'; } add_action( 'woocommerce_before_shop_loop_item_title','mywp_product_hover', 15, 0 );
Here is a working example: https://laiamartinmakeup.com/pa_marcas/madara/page/4/
However, on search results, this action is ignored, and instead it shows an auto excerpt:
https://laiamartinmakeup.com/tienda/?s=protecting%20hand%20cream
Note the first product is the same on both links.
Any help would be appreciated, been looking to excerpt and trim filters with no luck. Looks like WC search is ignoring the action.
Many thanks in advanced,
Cheers
M
- The topic ‘woocommerce_before_shop_loop_item_title action not working on search results’ is closed to new replies.