Skip to content

Commit

Permalink
Remove Creative Mail banner from branded plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ramyakrishnai committed Feb 15, 2024
1 parent a4a50a8 commit dd9e659
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => 'c3f16f7961a01916c59e');
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '6307329585bdd0c557f9');
8 changes: 8 additions & 0 deletions includes/ECommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public function __construct( Container $container ) {
add_action('woocommerce_admin_order_data_after_shipping_address', array( $this, 'display_custom_shipping_fields_in_admin' ), 10, 1 );
add_action( 'before_woocommerce_init', array( $this,'custom_payment_gateways_order'));
add_action('before_woocommerce_init', array( $this,'dismiss_woo_payments_cta'));
add_action( 'load-toplevel_page_'. $container->plugin()->id, array( $this, 'disable_creative_mail_banner' ) );

// Handle WonderCart Integrations
if ( is_plugin_active( 'wonder-cart/init.php' ) ) {
Expand Down Expand Up @@ -435,5 +436,12 @@ public function dismiss_woo_payments_cta() {
update_option('wcpay_welcome_page_incentives_dismissed', array("wcpay-promo-2023-action-discount"));
}
}

public function disable_creative_mail_banner() {
$is_dismissed = get_option( 'ce4wp_ignore_review_notice');
if (!is_array($is_dismissed) || empty($is_dismissed)) {
update_option('ce4wp_ignore_review_notice', true);
}
}

}

0 comments on commit dd9e659

Please sign in to comment.