Woocommerce – Specific template for product category? [closed]
You can create specific template for specific category using taxonomy-product_cat.php template. For more information visit this page.
You can create specific template for specific category using taxonomy-product_cat.php template. For more information visit this page.
Send and email to [email protected] and they can help you try to get in touch with the original plugin author. If the author is no where to be found and you can show that your able to keep it up to date it is possible that you could be allowed to take it over.
Yes there is, you can use the woocommerce_get_price filter hook to filter the value based on user role and return a price accordingly e.g: add_filter(‘woocommerce_get_price’, ‘custom_price_WPA111772’, 10, 2); /** * custom_price_WPA111772 * * filter the price based on category and user role * @param $price * @param $product * @return */ function custom_price_WPA111772($price, $product) { … Read more
A plugin that has security holes is a problem, whether or not it is activated. So here are some reasons why it is often recommended to remove plugins that you aren’t using. If you have plugins that you aren’t using, you often don’t care about keeping them updated. As a result, they won’t get any … Read more
If you want to add a add media button to your admin panels: You need to use wp_enqueue_media(); add_action ( ‘admin_enqueue_scripts’, function () { if (is_admin ()) wp_enqueue_media (); } ); Then use this js: jQuery(document).ready(function() { var $ = jQuery; if ($(‘.set_custom_images’).length > 0) { if ( typeof wp !== ‘undefined’ && wp.media && … Read more
WP v3.3 gave us the ability to run wp_enqueue_script in the middle of a page. Ticket 9346 This has made it much easier to include your JS with better granularity (when using shortcodes, at least). Here, jquery will be only included when our shortcode is fired. function get_slideshow() { // Do some stuff… // Load … Read more
One of the first things WordPress does to load plugins is get the active plugins as saved in the database: $active_plugins = (array) get_option( ‘active_plugins’, array() ); Since it uses get_option() we can use the option_active_plugins filter to modify the list of active plugins on the fly. function wpse_301282_disable_plugin( $active_plugins ) { if ( defined( … Read more
You can use wp_get_theme: <?php $theme = wp_get_theme(); // gets the current theme if ( ‘Twenty Twelve’ == $theme->name || ‘Twenty Twelve’ == $theme->parent_theme ) { // if you’re here Twenty Twelve is the active theme or is // the current theme’s parent theme } Or, you can simply check if a function in twentytwelve … Read more
add_filter() and add_action() are available before any plugin is loaded. So you can use both in the first line of your plugin or theme. For readability I recommend to group action and filter registrations at the very top of your main file: in a plugin, the file with the plugin header in a theme the … Read more
i currently work on a woocommerce v2.1.12 shop and it seems they chaged that behavior. my ajax url to add items to the cart has to look like this: ?add-to-cart=[PRODUCT-ID]&variation_id=[VARIATION-ID]&attribute_[ATTRIBUTE-NAME]=[ATTRIBUTE-SLUG]&attribute_[ATTRIBUTE-NAME]=[ATTRIBUTE-SLUG] example: http://example.com/store/category/product/?add-to-cart=239&variation_id=240&attribute_pa_size=48-2&attribute_pa_color=gold this adds a specific product to the cart and also sets the variation attributes in the cart. you can even set the quantity … Read more