A certain chatty AI found me a solution.
add_action( 'wp_footer', 'custom_pagination_script' );
function custom_pagination_script() {
?>
<script type="text/javascript">
jQuery( document ).ready( function( $ ) {
$( '.page-numbers a' ).click( function( event ) {
event.preventDefault();
var link = $( this ).attr( 'href' );
window.location = link + '#d3c-psf-products';
} );
} );
</script>
<?php
}
add_action( 'wp_footer', 'custom_sorting_script' );
function custom_sorting_script() {
?>
<script type="text/javascript">
jQuery( document ).ready( function( $ ) {
$( '.woocommerce-ordering' ).submit( function( event ) {
event.preventDefault();
var link = $( this ).attr( 'action' ) + '?' + $( this ).serialize() + '#d3c-psf-products';
window.location = link;
} );
} );
</script>
<?php
}
This solution does what I want perfectly.
Related Posts:
- porto theme pagination on woocommerce not working
- 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
- Pagination for a page created by the shortcode “Product”
- remove default pagination on woocommerce shop page
- Override static method in WC_Shortcodes class (shortcode) [closed]
- Unable to pull in custom product attribute in shortcode [closed]
- Adding author option to [products] woocommerce shortcode
- 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?
- How to work Woocommerce pagination inside shortcode?
- WooCommerce pagination: remove ‘page’ from url
- Pagination in woocommerce – Limiting page-numbers
- Custom pagination permalink structure Product page
- 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
- Tags pages for different Custom Post Types and WooCommerce Products sharing Post Tags
- 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)?
- WordPress Pagination products with AJAX
- how should i get products based on tags in woocommerce
- Woocommerce paginate link generates #038 instead of ? – seems connected to caching
- How to add a new endpoint in woocommerce
- Slow Loading Attribute Select – WooCommerce Backend
- add_filter to modify woocommerce_cart_item_name hyperlink
- How to get rid of the hover zoom in WooCommerce single products
- How do I display certain products via their category on a section of a page using PHP?
- Display orders instead of woocommerce my account dashboard for logged in users [closed]
- Detect whether a page is a product subcategory page?
- Programmatically change Payment Methods WooCommerce
- Get WooCommerce Email Classes in Backend
- Use Hooks to Limit One Comment Per User Per Post – Hide Form if Already Commented
- Display Categories Assigned to a WooCommerce Product
- pre_get_posts with WooCommerce Shortcode Query
- WooCommerce is slow with many categories [closed]
- Get current WooCommerce endpoint not working
- Changing Woocommerce price display [closed]
- How to remove recurring totals information for a particular subscription product? [closed]
- WordPress codex: apply_filters – clarification on creating a new hook on the fly. How do we use it?
- Set a default quantity input value for a variable product category in WooCommerce
- WooCommerce product sorting VERY slow
- WooCommerce change price in cart [closed]
- Categories not shown in admin after adding woocommerce products via wp wc cli
- Woocommerce – Move product without price a the end
- Enabling autosave when plugin disabled
- WooCommerce email text based on category && shipping zone && payment method [closed]
- How to get all attributes with their terms related to specific Woocommerce product category [closed]
- Woocommerce – disable «place order» until user checks Privacy Policy
- Calling calculate_shipping() with ajax in woocommerce
- Error do_shortcode In WooCommerce Template
- Adding product SKU before cart item name in WooCommerce
- Accessing parameters when adding filter
- Extra row / text field to a product page (WooCommerce)
- woocommerce_email_attachments filter arguments [closed]
- Problem with cURL and rest API
- Filter WooCommerce Orders query with user meta data
- Dropdown menu on custom page with product to choose number of products per page
- Child theme dosn’t overwrite WooCommerce (version 3.4.7)
- How to Show Single Product – 4 Data by ID in Custom Page without over-riding the existing Woo-Commerce
- WOOCommerce redirect after registration to account details
- How can I add an additional action button into the woocommerce admin order page?
- rating, share and review issue for single WooCommerce page
- Delete All Product Images in phpmyadmin
- Order Woocommerce Products by Latest Reviewed
- How to add a custom text for order confirmation email template woocommerce
- I want to get the value of a select attribute in the checkout page, and then use it to show or not the delivery data
- woocomerce is serving OR Relation instead of AND on taxonomy product_tag
- Woocommerce Subscriptions – Set Billing Interval/Period
- WooCommerce with ACF: custom fields per product variation
- Woocommerce checkout page reload on up dating shipping method
- change wp_login url and redirect users at the same time
- How to clear woocommerce checkout form after pageload
- Is there a plugin available for recurring orders in Woocommerce? [closed]
- Woocommerce PHP site that shows table with orders from specific category
- How to display text between product thumbnail and CTA button on WooCommerce “Shop” page
- Multiple archive product exist
- call_user_func_array() error in class-wp-hook.php
- Error after woocommerce update from 2.6 to 3.5 [closed]
- Send billing info from woocommerce checkout page to paypal checkout form
- Check if a category has a parent category in WooCommerce REST API
- Remove a higher quantity from stock according to a variation
- Auto generate user email while registration
- WooCommerce Cart Total Table chronology order change [closed]
- Woocommerce Update Order Notes Date
- Shipping Method does not inherit settings from the class
- My woocommerce checkout page and woocommerce setting page are not responding [closed]
- Reset all stock status in woocommerce
- How to – proper WordPress 301 redirects?
- Switch position of short description and variations [closed]