Commit fc213dbb authored by Kenny Hall's avatar Kenny Hall

Starting work on check for calcs to show Ninja Shop promo.

parent ecd82528
Pipeline #1855 passed with stage
in 31 seconds
......@@ -154,6 +154,22 @@ class NF_PromotionManager
return false;
}
private function calculations_in_use()
{
global $wpdb;
$query = "SELECT id FROM `" . $wpdb->prefix . "nf3_form_meta` WHERE type = 'calculations'";
$fields = $wpdb->get_results( $query, 'ARRAY_A' );
var_dump( $fields );
if( ! empty( $fields ) ) {
return true;
}
return false;
}
private function is_sendwp_active()
{
if( class_exists( '\\SendWP\\Mailer', FALSE ) ) {
......
......@@ -457,7 +457,7 @@ if( get_option( 'ninja_forms_load_deprecated', FALSE ) && ! ( isset( $_POST[ 'nf
add_action( 'nf_weekly_promotion_update', array( self::$instance, 'nf_run_promotion_manager' ) );
add_action( 'activated_plugin', array( self::$instance, 'nf_bust_promotion_cache_on_plugin_activation' ), 10, 2 );
// Checks php version and..
if( PHP_VERSION < 5.6 ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment