Plugin Directory

Changeset 3055634


Ignore:
Timestamp:
03/20/2024 09:40:34 PM (2 years ago)
Author:
svenl77
Message:

New version: 3.4.21

Location:
wc4bp
Files:
355 added
4 edited

Legend:

Unmodified
Added
Removed
  • wc4bp/trunk/admin/admin-ajax.php

    r3023806 r3055634  
    132132
    133133    public function wc4bp_add_page( $wc4bp_page_id ) {
    134         try {
    135             $position    = Request_Helper::get_post_param( 'wc4bp_position' );
    136             $children    = Request_Helper::get_post_param( 'wc4bp_children' );
    137             $page_id     = Request_Helper::get_post_param( 'wc4bp_page_id' );
    138             $old_page_id = Request_Helper::get_post_param( 'wc4bp_old_page_id' );
     134        if ( ! defined( 'DOING_AJAX' ) && DOING_AJAX ) {
     135            return false;
     136        }
     137        if ( ! current_user_can('manage_options') ) {
     138            return false;
     139        }
     140        check_ajax_referer( 'wc4bp_admin_sync_nonce', 'nonce' );
     141        try {
     142            if( ! isset( $_POST['page_data'] ) ){
     143                return;
     144            }
     145            $page_data = json_decode( wc_clean( stripslashes( $_POST['page_data'] ) ) );
     146            $position = isset( $page_data->wc4bp_position ) ? $page_data->wc4bp_position : '';
     147            $children = isset( $page_data->wc4bp_children ) ? $page_data->wc4bp_children : '';
     148            $page_id = isset( $page_data->wc4bp_page_id ) ? $page_data->wc4bp_page_id : '';
     149            $old_page_id = isset( $page_data->wc4bp_old_page_id ) ? $page_data->wc4bp_old_page_id : '';
    139150
    140151            if ( empty( $page_id ) ) {
     
    170181
    171182            update_option( 'wc4bp_pages_options', wp_json_encode( $wc4bp_pages_options ) );
    172             header( 'Content-Type: application/json' );
    173             echo json_encode( $wc4bp_pages_options );
    174             die();
     183            wp_send_json_success( $wc4bp_pages_options );
     184
    175185        } catch ( Exception $exception ) {
    176186            WC4BP_Loader::get_exception_handler()->save_exception( $exception->getTrace() );
  • wc4bp/trunk/class/includes/class-request-helper.php

    r2736711 r3055634  
    7474            } elseif ( 'post' === $args['type'] ) {
    7575                if ( isset( $_POST[ $args['param'] ] ) ) {
    76                     $value = wc_clean( maybe_unserialize( wp_unslash( $_POST[ $args['param'] ] ) ) );
     76                    $value = wc_clean( wp_unslash( $_POST[ $args['param'] ] ) );
    7777                }
    7878            } else {
  • wc4bp/trunk/readme.txt

    r3023806 r3055634  
    33Tags: woocommerce my account, woocommerce buddypress, woocommerce profile, woocommerce member pages, buddyboss
    44Requires at least: 4.9
    5 Tested up to: 6.4.2
    6 Stable tag: 3.4.20
     5Tested up to: 6.4.3
     6Stable tag: 3.4.21
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9696
    9797== Changelog ==
     98= 3.4.21 - 20 Mar 2024 =
     99* Fixed issue with PHP Object Injection.
     100* Added user role validation on ajax request.
     101* Tested up to WordPress 6.4.3
     102
    98103= 3.4.20 - 18 Jan 2024 =
    99104* Added user role validation ajax call.
  • wc4bp/trunk/wc4bp-basic-integration.php

    r3023806 r3055634  
    1010 * Author: ThemeKraft
    1111 * Author URI: https://themekraft.com/products/woocommerce-buddypress-integration/
    12  * Version: 3.4.20
     12 * Version: 3.4.21
    1313 * Licence: GPLv3
    1414 * Text Domain: wc4bp
     
    4848         * The plugin version
    4949         */
    50         const  VERSION = '3.4.20' ;
     50        const  VERSION = '3.4.21' ;
    5151        /**
    5252         * Minimum required WP version
Note: See TracChangeset for help on using the changeset viewer.