Settings * * @since 2.3 * * @param int $affiliate_id The Affiliates ID * @param int $user_id The User ID for this affiliate * * @return void */ public function enable_store_credit_output( $affiliate_id, $user_id) { $store_credit_enabled = affiliate_wp()->settings->get( 'store-credit' ); if ( ! $store_credit_enabled ) { return; } $global_store_credit_enabled = affiliate_wp()->settings->get( 'store-credit-all-affiliates' ); if ( $global_store_credit_enabled ) { return; } $change_payment_method = affiliate_wp()->settings->get( 'store-credit-change-payment-method' ); if ( ! $change_payment_method ) { return; } $affiliate_store_credit_enabled = affwp_get_affiliate_meta( $affiliate_id, 'store_credit_enabled', true ); ?>
settings->get( 'store-credit-change-payment-method' ); if ( ! $change_payment_method ) { return; } $enable_store_credit = isset( $data['affwp_sc_enable_store_credit'] ) ? $data['affwp_sc_enable_store_credit'] : ''; if ( $enable_store_credit ) { affwp_update_affiliate_meta( $data['affiliate_id'], 'store_credit_enabled', $enable_store_credit ); } else { affwp_delete_affiliate_meta( $data['affiliate_id'], 'store_credit_enabled' ); } } } new AffiliateWP_Store_Credit_Dashboard;