Skip to content

Commit

Permalink
method name updated to product_created_or_updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ramyakrishnai committed Oct 30, 2023
1 parent 6e1074f commit 347ed84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/Listeners/Commerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function register_hooks() {
// Paypal Connection
add_filter( 'pre_update_option_yith_ppwc_merchant_data_production', array( $this, 'paypal_connection' ), 10, 2 );
add_filter('update_option_ewc4wp_sso_account_status', array($this, 'ecomdash_connected'));
add_filter( 'woocommerce_update_product', array( $this, 'create_product' ), 100, 2 );
add_filter( 'woocommerce_update_product', array( $this, 'product_created_or_updated' ), 100, 2 );
}

/**
Expand Down Expand Up @@ -281,7 +281,7 @@ public function ecomdash_connected($new_option, $old_option) {
* @param WP_POST $product details of the product
* @return void
*/
public function create_product($product_id, $product) {
public function product_created_or_updated($product_id, $product) {
$data = array(
"label_key" => "product_type",
"product_type" => $product->product_type,
Expand Down

0 comments on commit 347ed84

Please sign in to comment.