Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Commit

Permalink
fixes #356
Browse files Browse the repository at this point in the history
make action hook more precise to reduce number of calls
  • Loading branch information
Jon007 committed Aug 24, 2018
1 parent 42db06e commit 29f4895
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Hyyan/WPI/Product/Variable.php
Expand Up @@ -28,8 +28,8 @@ class Variable
public function __construct()
{
// Handle variations duplication
add_action('save_post', array($this, 'duplicateVariations'), 10, 3);
add_action('save_post', array($this, 'syncDefaultAttributes'), 10, 3);
add_action( 'save_post_product', array( $this, 'duplicateVariations' ), 10, 3 );
add_action( 'save_post_product', array( $this, 'syncDefaultAttributes' ), 10, 3 );

// Remove variations
add_action('wp_ajax_woocommerce_remove_variations', array($this, 'removeVariations'), 9);
Expand Down

0 comments on commit 29f4895

Please sign in to comment.