Skip to content

Commit

Permalink
Merge pull request #625 from bluehost/update/woocommerce-sharing
Browse files Browse the repository at this point in the history
Update/woocommerce sharing
  • Loading branch information
circlecube authored Aug 29, 2023
2 parents 1db329d + 7d9db53 commit 9633d9b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions inc/partners.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,22 @@ function aioseo_upgrade_affiliate_link( $url ) {
}

add_filter( 'aioseo_upgrade_link', __NAMESPACE__ . '\\aioseo_upgrade_affiliate_link' );

/**
* Enable Sharing with WooCommerce
*
* @param string $plugin the plugin
* @param boolean $network_activation flag is network activated
*
* @return void
*/
function plugin_activated( $plugin, $network_activation ) {
switch( $plugin ) {
case 'woocommerce/woocommerce.php':
// Enable the usage tracking option by default https://woocommerce.com/usage-tracking/
update_option( 'woocommerce_allow_tracking', 'yes' );
break;
}
}

add_action( 'activated_plugin', __NAMESPACE__ . '\\plugin_activated', 10, 2 );

0 comments on commit 9633d9b

Please sign in to comment.