We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 005e849 commit 086b4abCopy full SHA for 086b4ab
src/Integrations/WooCommerce.php
@@ -204,6 +204,10 @@ public function track_direct_add_to_cart() {
204
* @codeCoverageIgnore Because we can't test XHR requests here.
205
*/
206
public function track_add_to_cart( $product, $add_to_cart_data ) {
207
+ if ( ! $product ) {
208
+ return;
209
+ }
210
+
211
$product_data = $this->clean_data( $product->get_data() );
212
$added_to_cart = $this->clean_data( $add_to_cart_data );
213
$cart = WC()->cart;
0 commit comments