Try this:
function htdat_shortcode_atts_products( $out, $pairs, $atts, $shortcode ) {
if ( isset ( $atts['author'] ) ) $out['author'] = $atts['author'];
return $out;
}
add_filter('shortcode_atts_products', 'htdat_shortcode_atts_products', 10, 4);
function htdat_woocommerce_shortcode_products_query( $query_args, $attributes ) {
if ( isset( $attributes['author'] ) ) $query_args['author'] = $attributes['author'];
return $query_args;
}
add_filter( 'woocommerce_shortcode_products_query', 'htdat_woocommerce_shortcode_products_query', 10, 2 );
Related Posts:
- How can I define a custom template for woocommerce [products] shortcode? [closed]
- Shortcode with product catgory counter
- wc_get_product in a none woocommerce page
- WooCommerce Multi-Currency shortcode not working
- shortcode to display woocommerce cart total
- Products Shortcode is Displaying Single Product Page Price for all Products [closed]
- How can I custom order the product display?
- Woocommerce Shortcode custom orderby not working
- Override static method in WC_Shortcodes class (shortcode) [closed]
- Unable to pull in custom product attribute in shortcode [closed]
- Pass class to Woocommerce shortcode [relative_products] [closed]
- Create a shortcode for native WooCommerce search form [closed]
- How can i access woocommerce order variables inside shortcode?
- porto theme pagination on woocommerce not working
- I want to show always 4 category boxes everytime in woocommerce
- How to use products shortcode in taxonomy-product_cat with multiple columns?
- Why isn’t working WooCommerce session inside shortcode?
- Shortcodes in billing fields doesn’t work
- woocommerce Shortcodes – Change display between mobile and Desktop
- How to check which shortcode is using my template?
- If YITH Wishlist page is set to the WooCommerce my-account endpoint, the endpoints stop working all together. Any solution?
- Creating a shortcode with a variable (Woocommerce)?
- Trying to insert a div ID link into Woocommerce shortcode Pagination
- how should i get products based on tags in woocommerce
- Share users and WooCommerce memberships between two installations
- Show only geolocated user country into Woocommerce checkout country fields
- How to hook on a WooCommerce checkout field?
- Woocommerce – How to add 5 stars to all products to test design
- How to get woocomerce attributes thumbnail in PHP? [closed]
- Programmatically added variations not showing until clicking Update button
- How to have specific prices for some particular pin codes in woocommerce? [closed]
- How to automatically add and show all the product attributes when creating a new product
- How do I get the latest note on the order at woocommerce? [closed]
- Woocommerce Login Redirect not working [closed]
- How can i create a WooCommerce product programatically or using sql query?
- Is it safe to update WooCommerce data update?
- Output JSON object with woocommerce products
- Fatal Error in WordPress WooCommerce theme “Call to undefined function wc_get_theme_slug_for_templates()”
- Signup Form that adds customer to MailChimp, redirects to checkout, and fills in form data
- how to pass a woocommerce product name to contact form7 [closed]
- Woocommerce Subscription Pricing/Billing Schedule
- ‘profile_update’ hook alternative for WooCommerce user meta data
- How to add a user custom field into Woocommerce emails?
- WooCommerce subscription, give option to prorate or not to prorate to user while switching subscription
- Woocommerce Rest Api Categories problem [closed]
- wc-ajax=get_variation slow speed in WooCommerce
- Add custom CSS class to product images
- Get product variation attribute titles – WooCommerce
- Get specific values in Woocommerce Rest API
- Javascript error when adding an item to the cart [closed]
- Woocommerce: Complex query in pre_get_posts [closed]
- Woocommerce check if email already created order recently [closed]
- Switch to user link
- Customize WooCommerce Add To Cart Form Name [closed]
- Is there a preset CSS class when shopping cart isn’t empty?
- How to translate text in function.php with WPML [closed]
- Woocommerce product options [closed]
- WordPress SMS API integration without plugin error
- Absolute search against wordpress api
- Code specific for specific products
- Change Firstname & Lastname order in the order-processing e-mail templates
- Trying to run Javascript on AJAX call
- Rewrite rules for sub category (child product categry & grand-child)
- WooCommerce – dynamically loading checkout page using ajax not showing payment methods for guest
- Two Filter Issue [closed]
- Show notice to user based on User Meta
- Google Analytics gtag code messes up woocommerce cart & login
- Fragments to Update Cart Counter not working on homepage – Woocommerce
- WooCommerce Review Author Hook on Review Submission
- woocommerce ad custom button with custom link after add to cart for every product
- I wan redirect link post search to search product woocommerce?
- Exclude Specific Product Category for showing up in its parent category page
- How to fire a disabled WooCommerce New Order notification?
- Set up PayPal with wrong email by mistake
- Does WP-WooC support filters at database?
- How to send welcome email once user buys the subscription
- Removed Sidebar in single product page
- Reorder PRODUCTS in categories Woo
- Woocommerce section name? [closed]
- how to change value return by _stock_status
- Retrieve Woocommerce Cart Url with javascript/jquery [closed]
- woocommerce_email_recipient_new_order not triggered
- Load custom post template
- how to edit woocommerce checkout page
- How to only show featured products in wooCommerce using function.php function
- How to insert link, with lightbox, that opens specific page content only
- Remove plugin function and add it back in via functions.php
- deactivate product-page image slider on mobile
- Woocommerece category page showing in stock product as out of stock
- Increase product variation limit in woocommerce
- WooCommerce widget “WooCommerce Products” template [closed]
- Woocommerce woocommerce_breadcrumb_defaults filter [closed]
- Some Admin disappeared
- Sort by promo code used woocommerce admin panel [closed]
- How to access Woo Commerce products from within custom theme? [closed]
- Use Homepage as “Shop” for Woocommerce [closed]
- How to display India country first in country selection drop down list in WordPress
- error 500 in Back Office when using a woocommerce function in functions.php
- Sort by price when price is set in multiple keys
- Add a product for all users based on a condition (WooCommerce)