Plugin Directory

Changeset 3046979


Ignore:
Timestamp:
03/07/2024 11:55:21 AM (12 months ago)
Author:
bogdanfix
Message:

1.3.1 update release;

Location:
wp-sendfox
Files:
20 added
3 edited

Legend:

Unmodified
Added
Removed
  • wp-sendfox/trunk/readme.txt

    r2998124 r3046979  
    66Tested up to: 6.4
    77Requires PHP: 5.2.4
    8 Stable tag: 1.3.0
     8Stable tag: 1.3.1
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    5656== Changelog ==
    5757
     58= 1.3.1 =
     59* feature: support for WooCommerce HPOS;
     60* tweak: improved Access Control for gb_sf4wp_process_sync() (Big thanks to Abdi Pranata);
     61
    5862= 1.3.0 =
    5963* integration: LearnDash Course Enrollment (Big thanks to Rodolfo Martinez!);
  • wp-sendfox/trunk/wp-sendfox-admin.php

    r2998124 r3046979  
    882882                        stage: 1,
    883883                        list: list,
    884                         mode: mode
     884                        mode: mode,
     885                        nonce: '<?php echo wp_create_nonce('sf4wp-sync-nonce'); ?>'
    885886                    };
    886887
  • wp-sendfox/trunk/wp-sendfox.php

    r2998124 r3046979  
    66Author: BogdanFix
    77Author URI: https://bogdanfix.com/
    8 Version: 1.3.0
     8Version: 1.3.1
    99Text Domain: sf4wp
    1010Domain Path: /lang
     
    1616
    1717define( 'GB_SF4WP_NAME', 'SendFox for WordPress' );
    18 define( 'GB_SF4WP_VER', '1.3.0' );
     18define( 'GB_SF4WP_VER', '1.3.1' );
    1919define( 'GB_SF4WP_ID', 'wp-sendfox' );
    2020
     
    7979        }
    8080    }
    81 
    82     // declare WooCommerce HPOS support
    83 
    84     add_action( 'before_woocommerce_init', function() {
    85         if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
    86             \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
    87         }
    88     } );
    8981}
    9082add_action( 'init', 'gb_sf4wp_init' );
     83
     84// declare WooCommerce HPOS support
     85
     86add_action( 'before_woocommerce_init', function() {
     87    if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
     88        \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
     89    }
     90} );
    9191
    9292/**
     
    908908    $result = array( 'result' => 'error' );
    909909
     910    if( !wp_verify_nonce( $_POST['nonce'], 'sf4wp-sync-nonce' ) )
     911    {
     912        $result['error_text'] = 'nonce error';
     913
     914        echo json_encode( $result );
     915
     916        wp_die();
     917    }
     918
     919    if( !current_user_can( 'manage_options' ) )
     920    {
     921        $result['error_text'] = 'user role error';
     922
     923        echo json_encode( $result );
     924
     925        wp_die();
     926    }
     927
    910928    if(
    911929        !empty( $_POST['stage'] ) &&
     
    935953                else
    936954                {
    937                     $response['error_text'] = 'count users error';
     955                    $result['error_text'] = 'count users error';
    938956                }
    939957            }
     
    980998                else
    981999                {
    982                     $response['error_text'] = 'count customers error';
     1000                    $result['error_text'] = 'count customers error';
    9831001                }
    9841002            }
    9851003            else
    9861004            {
    987                 $response['error_text'] = 'mode error';
     1005                $result['error_text'] = 'mode error';
    9881006            }
    9891007        }
     
    10671085                else
    10681086                {
    1069                     $response['error_text'] = 'get users error';
     1087                    $result['error_text'] = 'get users error';
    10701088                }
    10711089            }
     
    11691187                else
    11701188                {
    1171                     $response['error_text'] = 'get customers error';
     1189                    $result['error_text'] = 'get customers error';
    11721190                }
    11731191            }
    11741192            else
    11751193            {
    1176                 $response['error_text'] = 'mode error';
     1194                $result['error_text'] = 'mode error';
    11771195            }
    11781196        }
    11791197        else
    11801198        {
    1181             $response['error_text'] = 'stage error';
     1199            $result['error_text'] = 'stage error';
    11821200        }
    11831201    }
    11841202    else
    11851203    {
    1186         $response['error_text'] = 'request error';
     1204        $result['error_text'] = 'request error';
    11871205    }
    11881206
Note: See TracChangeset for help on using the changeset viewer.