Commit c4863b50 authored by Kenny Hall's avatar Kenny Hall

Moved check to the set promotion function.

parent 6898a8cd
Pipeline #1848 passed with stages
in 1 minute and 38 seconds
......@@ -20,13 +20,7 @@ class NF_PromotionManager
public function get_promotions()
{
if ( apply_filters( 'ninja_forms_disable_marketing', false ) )
{
$this->promotions = array();
return $this->promotions;
} else {
return $this->promotions;
}
return $this->promotions;
}
/**
......@@ -34,7 +28,12 @@ class NF_PromotionManager
*/
private function set_promotions()
{
$this->promotions = Ninja_Forms()->config( 'DashboardPromotions' );
if ( apply_filters( 'ninja_forms_disable_marketing', false ) )
{
$this->promotions = array();
} else {
$this->promotions = Ninja_Forms()->config( 'DashboardPromotions' );
}
}
/**************************************************************************
......
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