We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af59ab4 commit badb135Copy full SHA for badb135
includes/class-wc-product-simple.php
@@ -45,7 +45,7 @@ public function add_to_cart_url() {
45
array(
46
'add-to-cart' => $this->get_id(),
47
),
48
- function_exists( 'is_feed' ) && is_feed() ? $this->get_permalink() : ''
+ ( function_exists( 'is_feed' ) && is_feed() ) || ( function_exists( 'is_404' ) && is_404() ) ? $this->get_permalink() : ''
49
)
50
) : $this->get_permalink();
51
return apply_filters( 'woocommerce_product_add_to_cart_url', $url, $this );
0 commit comments