update( AFF_WC_TABLE , array( 'referral_amount' => $_POST['referral_amount'] ), array( 'id' => $_POST['referrer_id'] ), array( '%d' ), array( '%d' ) ); if($update_table){ add_action( 'admin_notices', self::data_insert__success() ); }else{ add_action( 'admin_notices', self::data_insert__fails() ); } } } if ( isset( $_POST['delete'] ) ) { if ( wp_verify_nonce( $_POST[NONCE], SET_ADMIN_OPTIONS ) ) { $delete_data = $wpdb->delete( AFF_WC_TABLE , array( 'ID' => $_POST['referrer_id'] ) ); if($delete_data){ add_action( 'admin_notices', self::data_delete__success() ); }else{ add_action( 'admin_notices', self::data_delete__fails() ); } } } $query = 'SELECT * FROM '.AFF_WC_TABLE.' ;'; $referral_lists = $wpdb->get_results($query , ARRAY_A); $output = ''; $output .= '
| S NO | '; $output .= 'Affiliate ID | '; $output .= 'Affiliate Name | '; $output .= 'Referral Amount | '; $output .= ''; $output .= ' | '; $output .= ' |
|---|---|---|---|---|---|
'. __( 'Data Updated Successfully !', AFF_REF_WC_INTEGRATION_PLUGIN_DOMAIN ).'
'. __( 'Failed to Update Data!!!!', AFF_REF_WC_INTEGRATION_PLUGIN_DOMAIN ).'
'. __( 'Data Deleted Successfully !!!!', AFF_REF_WC_INTEGRATION_PLUGIN_DOMAIN ).'
'. __( 'Failed to delete Data!!!!', AFF_REF_WC_INTEGRATION_PLUGIN_DOMAIN ).'