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
- wc_get_template_part( ‘content’, ‘product’ ) | Where is this file located?
- how to get woocommerce product attribute slug
- How to build a plugin that supports authenticated POST requests to the REST API from external servers?
- Where can I find a single item template
- Get Woocommerce Subscription Product
- WooCommerce pages accessible to logged in members only
- paypal not showing on woocommerce payments
- Target WooCommerce Product Gallery Image (rather than Featured Image) for og:image
- How to update the WooCommerce cart Icon to show new products added with JavaScript
- Remove the link from the thumbnail and product title on woocommerce
- How to configure Woocommerce Payment Methods programmatically?
- woocommerce_package_rates not fired everytime
- how to change woocommerce shop archive description? [closed]
- How to display the result of a custom metabox in the frontend [closed]
- Subscription on Checkout
- Woocommerce – display product in page but in list format with excerpt
- how to show store name when I add a product on cart in woocommerce(woocommerce multi store)?
- When Free shipping is available hide other shipping methods except Local pickup in WooCommerce [closed]
- Create archive page for woocommerce attribute
- How to increase execution time out limit in WordPress dashboard?
- Setting an attribute as variation in woo commerce via php [duplicate]
- WooCommerce – Conditionally enable shipping for virtual products
- Add to Cart button displaying twice on Shop Page Woocommerce
- How to exclude a taxonomy from shop & search page wooCommerce?
- How to remove unwanted text bug in wordpress site
- get woocommerce product image url and price from database [closed]
- Trying to style Woocommerce sidebar Cart Widget [closed]
- WooCommerce how to checkout a product without adding it to the cart
- Conditional logic – if product has a parent category, echo this
- How to add a “buy now” button below “add to cart” button [closed]
- Cart page displays the price and amount as zero regardless of price entered [closed]
- Custom action not working in Woocommerce
- How to alter taxes amounts when updating an order
- Woocommerce variable product’s total amount by javascript
- Save product short description in order (without updating in order details if it is updated in product)
- Combine one action and one filter
- woocommerce add button underneath order details
- Where do I remove admin order fields (unset doesn’t work)
- How to Get WooCommerce Product Price
- Auto set Woocommerce product ID as SKU on save
- Change the customer’s name to a link on an order management page
- Applying pre-production modifications
- WooCommerce – Remove automaticly added membership product if user remove regular product from cart
- Possible to have multiple Authorize.net accounts on the same site?
- Allow HTML in product attributes for WooCommerce
- Use woocomerce shop filters on other pages
- wp_link_pages shortcode for ‘nextpagelink’
- Woocommerce – change image issue
- Woocommerce: relevancy based related products
- Shortcode with pagination advancing multiple queries
- Added .html to Woocommerce permalink but pagination don’t work!
- Custom Shipping Method: need non-instance settings and non-global settings
- how to query single product in woocommerce? [closed]
- woocommerce-how can i get all products by their groups! [closed]
- Anchor link to every product
- Plugin could not be activated because it triggered a fatal error
- Woocommerce custom product with JS script, can’t understand how it works [closed]
- Setup WooCommerce to properly handle inventory with variable product?
- Link Back to Parent Category – Woocommerce
- WooCommerce: I Need to hide my page title/header (including menu) from all the WooCommerce related product pages, such as category and keyword pages
- How to add another ordercomments field to woocommerce checkout
- Select Child Attributes Based on Parent [closed]
- How to display gravity form data to woocommerce my account orders table?
- Custom e-commerce display for specific users [closed]
- How to get the attributes based on dependency in woocommerce?
- Woocommerce composite and bundle products
- Display product categories + child-categories on a single product page
- I want to Display custom woocomerce meta box in orders list