New answers tagged woocommerce-offtopic
0
votes
Woocommerce check if email already created order recently
You can create a helper function for that which qurries the orders for given email and created less than 10 mins ago.
function wpse407278_check_if_ordered_in_last_10_mins() {
$args = array(
...
0
votes
Hiding products with a specific tag and traffic UTM parameter from WooCommerce main shop page
You'll need a custom theme or child theme to work from. From there, you should be able to edit something like shop.php or whatever template is being used for the shop to include a conditional:
<?...
0
votes
woocommerce axios react
It's old question but maybe it works for who struggle with this problem. You can use woocommerce 's own api (https://woocommerce.github.io/woocommerce-rest-api-docs/)
// Install:
// npm install --save ...
0
votes
Conditionally run function based on custom meta value?
Instead of conditionally adding an add_action() call, you can just add it and run the function it hooks to—its callback—conditionally instead.
For example:
add_action( '...
1
vote
Accepted
A function to add arguments to a taxonomy
Use the filter register_taxonomy_args to manipulate the arguments used for registering the taxonomy just before it is registered:
function wpse_406824_vendor_taxonomy_args( $args, $name ) {
if ( $...
0
votes
Retrieve Data from Custom Endpoint
As you said "Coupon is created in WooCommerce end", we can confirm that custom endpoint "webhook" is working finely.
The issue is regrading to retrieve Email Address from the ...
0
votes
How to show or hide all payment methods on cart screen?
It turns out that PayPal has multiple payment options for WooCommerce.
I chose "PayPal Checkout" and clicked on "Setup"
Then I found a checkbox for "Enable on Cart" - I ...
0
votes
woocommerce Shortcodes - Change display between mobile and Desktop
@media (max-width: 544px) {
.woocommerce ul.products:not(.elementor-grid).columns-3, .woocommerce-page ul.products:not(.elementor-grid).columns-3 {
grid-template-columns: repeat(2,minmax(0,1fr));
}...
1
vote
Accepted
How to set the meta description of a WooCommerce product as its primary category description?
Use the wpseo_metadesc filter:
function wpse_406559_product_meta_description_from_category( $description ) {
if ( ! is_singular( 'product' ) || $description ) {
// Bail early if not single ...
1
vote
Accepted
Change product_base programmatically
Use your plugin activation hook to make the change. That will only run once, when your plugin is first activated, allowing the user to overwrite that change later (if they want to).
...
0
votes
Display Sale Price Before Regular Price (WooCommerce)
I have tried it myself and this is my price.php code. You just need to add some css as per your need.
First, remove the existing code
'<p class="'.esc_attr( apply_filters( '...
Top 50 recent answers are included
Related Tags
woocommerce-offtopic × 3901php × 547
plugins × 414
functions × 227
plugin-development × 215
categories × 190
hooks × 168
customization × 158
wp-query × 129
filters × 115
custom-field × 106
ajax × 79
custom-taxonomy × 70
javascript × 69
custom-post-types × 68
theme-development × 68
email × 67
rest-api × 66
loop × 65
css × 64
actions × 64
order × 59
jquery × 58
templates × 57
search × 57