Skip to content

Commit

Permalink
fix issue with product_view event - handle no extra props
Browse files Browse the repository at this point in the history
  • Loading branch information
haszari committed Mar 22, 2020
1 parent 32b0409 commit 220eddb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ public function get_common_properties() {
*
* @param string $event_name The name of the event to record.
* @param integer $product_id The id of the product relating to the event.
* @param array $properties Array of key => value event properties.
* @param array $properties Optional array of (key => value) event properties.
*/
public function record_event( $event_name, $product_id, $properties ) {
public function record_event( $event_name, $product_id, $properties = array() ) {
$product = wc_get_product( $product_id );
if ( ! $product instanceof WC_Product ) {
return;
Expand Down

0 comments on commit 220eddb

Please sign in to comment.