Plugin Directory

Changeset 3466143


Ignore:
Timestamp:
02/21/2026 12:13:40 AM (5 weeks ago)
Author:
phppoet
Message:

Update codebase of 3.8.3

Location:
customize-my-account-for-woocommerce
Files:
2 added
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • customize-my-account-for-woocommerce/tags/3.8.3/customize-my-account-for-woocommerce.php

    r3466111 r3466143  
    44    Plugin URI: https://sysbasics.com
    55    Description: Customize My account page. Add/Edit/Remove Endpoints.
    6     Version: 3.8.2
     6    Version: 3.8.3
    77    Author: SysBasics
    88    Author URI: https://sysbasics.com
  • customize-my-account-for-woocommerce/tags/3.8.3/include/admin/admin_settings.php

    r3466111 r3466143  
    297297    public function add_endpoint_form_response() {
    298298       
    299         if( isset( $_POST['wcmamtx_add_endpoint_nonce'] ) && wp_verify_nonce( $_POST['wcmamtx_add_endpoint_nonce'], 'wcmamtx_nonce_hidden') ) {
    300 
    301        
    302        
    303            
    304 
    305         if (isset($_POST['nds']['row_type'])) {
    306             $row_type     = sanitize_text_field($_POST['nds']['row_type']);
    307         }
    308        
    309         if (isset($_POST['nds']['label'])) {
    310             $new_name      = sanitize_text_field($_POST['nds']['label']);
    311         }
    312 
    313 
    314 
    315         $random_number  = mt_rand(100000, 999999);
    316         $random_number2 = mt_rand(100000, 999999);
    317 
    318 
    319 
    320         switch($row_type) {
    321             case "endpoint":
    322                 $new_key   = 'custom-endpoint-'.$random_number.'';
    323             break;
    324 
    325             case "link":
    326                 $new_key   = 'custom-link-'.$random_number.'';
    327             break;
    328 
    329             case "group":
    330                 $new_key   = 'custom-group-'.$random_number.'';
    331             break;
    332 
    333             default:
    334                 $new_key   = 'custom-endpoint-'.$random_number.'';
    335             break;
    336         }
    337 
    338 
    339         $new_row_values    = array();
    340 
    341         $advancedsettings  = (array) get_option('wcmamtx_advanced_settings');
    342 
    343         if (!isset($advancedsettings) || (sizeof($advancedsettings) == 1)) {
    344             $tabs  = wc_get_account_menu_items();
    345 
    346             foreach ($tabs as $key=>$value) {
    347            
    348                 $new_row_values[$key]['endpoint_key']        = $key;
    349                 $new_row_values[$key]['endpoint_name']       = $value;
    350                 $new_row_values[$key]['wcmamtx_type']        = 'endpoint';
    351                 $new_row_values[$key]['parent']              = 'none';
    352 
    353                 $new_row_values[$key]['class']               = isset($value['class']) ? $value['class'] : "";
    354 
    355                
    356                 $new_row_values[$key]['visibleto']           = isset($value['visibleto']) ? $value['visibleto'] : "all";
    357                 $new_row_values[$key]['roles']               = isset($value['roles']) ? $value['roles'] : array();
    358                 $new_row_values[$key]['icon_source']         = "default";
    359                 $new_row_values[$key]['icon']                = isset($value['icon']) ? $value['icon'] : "";
    360                 $new_row_values[$key]['content']             = isset($value['content']) ? $value['content'] : "";
    361                 $new_row_values[$key]['show']                = isset($value['show']) ? $value['show'] : "yes";
    362                 $new_row_values[$key]['upload_icon']         = isset($value['upload_icon']) ? $value['upload_icon'] : "";
    363 
    364             }
    365 
    366         } else {
    367            
    368 
    369             foreach ($advancedsettings as $key2=>$value2) {
    370 
    371                 $key2 = isset($value2['endpoint_key']) ? $value2['endpoint_key'] : $key2;
    372 
    373 
    374            
    375                 $new_row_values[$key2]['endpoint_key']        = $key2;
    376                 $new_row_values[$key2]['endpoint_name']       = $value2['endpoint_name'];
    377                 $new_row_values[$key2]['wcmamtx_type']        = $value2['wcmamtx_type'];
    378                 $new_row_values[$key2]['parent']              = $value2['parent'];
    379                
    380                 $new_row_values[$key2]['class']               = isset($value2['class']) ? $value2['class'] : "";
    381                 $new_row_values[$key2]['visibleto']           = isset($value2['visibleto']) ? $value2['visibleto'] : "all";
    382                 $new_row_values[$key2]['roles']               = isset($value2['roles']) ? $value2['roles'] : array();
    383                 $new_row_values[$key2]['icon_source']         = isset($value2['icon_source']) ? $value2['icon_source'] : "default";
    384                 $new_row_values[$key2]['icon']                = isset($value2['icon']) ? $value2['icon'] : "";
    385                 $new_row_values[$key2]['show']                = isset($value2['show']) ? $value2['show'] : "yes";
    386                 $new_row_values[$key2]['upload_icon']         = isset($value2['upload_icon']) ? $value2['upload_icon'] : "";
    387 
    388                 $default_color = wcmamtx_get_default_tab_color($key2);
    389 
    390                 $default_color_font = '#334155';
    391 
    392 
    393                 $new_row_values[$key2]['dash_back_color']                = isset($value2['dash_back_color']) ? $value2['dash_back_color'] : $default_color;
    394                 $new_row_values[$key2]['dash_font_color']         = isset($value2['dash_font_color']) ? $value2['dash_font_color'] : $default_color_font;
    395 
    396                 $new_row_values[$key2]['third_party']        = isset($value2['third_party']) ? $value2['third_party'] : null;
    397                
    398 
    399                 if (isset($value2['wcmamtx_type']) && ($value2['wcmamtx_type'] == "link")) {
    400                     $new_row_values[$key2]['link_inputtarget']              = $value2['link_inputtarget'];
    401                     $new_row_values[$key2]['link_targetblank']              = $value2['link_targetblank'];
    402                 }
    403 
    404 
    405                 if (isset($value2['wcmamtx_type']) && ($value2['wcmamtx_type'] == "endpoint")) {
    406                     $new_row_values[$key2]['content']              = isset($value2['content']) ? $value2['content'] : "";
    407                 }
    408 
    409 
    410 
    411                 if (isset($value2['wcmamtx_type']) && ($value2['wcmamtx_type'] == "group")) {
    412 
    413                     $new_row_values[$key2]['group_open_default']   = isset($value2['group_open_default']) ? $value2['group_open_default'] : "no";
    414 
    415                 }
    416 
    417 
    418                  if ($key2 == "dashboard") {
    419                     $new_row_values[$key2]['hide_dashboard_hello']            = isset($value2['hide_dashboard_hello']) ? $value2['hide_dashboard_hello'] : 00;
    420                     $new_row_values[$key2]['hide_intro_hello']                = isset($value2['hide_intro_hello']) ? $value2['hide_intro_hello'] : 00;
    421                     $new_row_values[$key2]['content_dash']                    = isset($value2['content_dash']) ? $value2['content_dash'] : "";
    422                 }
    423                
    424                
    425            
    426 
    427             }
    428 
    429         }
    430 
    431 
    432 
    433 
    434             if (isset($new_name) && ($new_name != '')) {
    435                 $new_row_values[$new_key]['endpoint_key']        = $new_key;
    436                 $new_row_values[$new_key]['endpoint_name']       = $new_name;
    437                 $new_row_values[$new_key]['wcmamtx_type']        = $row_type;
    438                 $new_row_values[$new_key]['parent']              = 'none';
    439 
    440                 if ($row_type == "endpoint") {
    441                     $new_row_values[$new_key]['content']              = '{default_content}';
    442 
    443                     $wcmamtx_endpoint_allowed_to_add = get_option('wcmamtx_endpoint_allowed_to_add');
    444 
    445                     $wcmamtx_endpoint_allowed_to_add = $wcmamtx_endpoint_allowed_to_add - 1;
    446 
    447                    
    448                     update_option('wcmamtx_endpoint_allowed_to_add',$wcmamtx_endpoint_allowed_to_add);
    449                    
    450 
    451                    
    452                 }
    453 
    454                 if ($row_type == "group") {
    455 
    456 
    457                     $wcmamtx_groups_allowed_to_add = get_option('wcmamtx_groups_allowed_to_add');
    458 
    459                     $wcmamtx_groups_allowed_to_add = $wcmamtx_groups_allowed_to_add - 1;
    460 
    461                    
    462                     update_option('wcmamtx_groups_allowed_to_add',$wcmamtx_groups_allowed_to_add);
    463 
    464                 }
    465 
    466                 if ($row_type == "link") {
    467                     $new_row_values[$new_key]['link_inputtarget']              = esc_url(site_url());
    468                 }
    469                
    470 
    471             }
    472 
    473        
    474 
    475 
    476 
    477        
    478 
    479         if (($new_row_values != $advancedsettings) && !empty($new_row_values)) {
    480             update_option($this->wcmamtx_notices_settings_page,$new_row_values);
    481             update_option('wcmamtx_flush_rewrite_cache_required',"yes");
    482 
    483             if ($row_type == 'endpoint') {
    484                 $allowed_endpoints = get_option("wcmamtx_allowed_endpoint_trial");
    485 
    486                 if (isset($allowed_endpoints) && ($allowed_endpoints > 0))  {
    487                     $allowed_endpoints = $allowed_endpoints - 1;
    488                     update_option('wcmamtx_allowed_endpoint_trial',$allowed_endpoints);
    489                 }
    490             }
    491         }
    492 
    493         // add the admin notice
    494             $admin_notice = "success";
    495 
    496         // redirect the user to the appropriate page
    497             wp_redirect('admin.php?page=wcmamtx_advanced_settings');
    498             exit;
    499         }           
    500         else {
    501             wp_die( __( 'Invalid nonce specified','customize-my-account-for-woocommerce' ), __( 'Error','customize-my-account-for-woocommerce' ), array(
    502                 'response'  => 403,
    503                 'back_link' => 'admin.php?page=wcmamtx_advanced_settings',
    504 
    505             ) );
    506         }
     299           include("endpoint_form_response.php");
    507300    }
    508301
  • customize-my-account-for-woocommerce/tags/3.8.3/include/wcmamtx_countof_functions.php

    r3466081 r3466143  
    245245            break;
    246246
     247            case "woo-wallet-balance":
     248            if ( is_plugin_active( 'woo-wallet/woo-wallet.php' ) ) {
     249                wcmamtx_render_woo_wallet_count_bubble_html($count_bubble,$hide_empty,$sidebar);
     250            }       
     251            break;
     252
     253            case "points":
     254                if ( is_plugin_active( 'points-and-rewards-for-woocommerce/points-rewards-for-woocommerce.php' ) ) {
     255
     256                    wcmamtx_render_wpswings_points_count_bubble_html($count_bubble,$hide_empty,$sidebar);
     257                }       
     258            break;
     259
    247260
    248261            case "none":
  • customize-my-account-for-woocommerce/tags/3.8.3/readme.txt

    r3466111 r3466143  
    77WC Requires at least: 4.0
    88Requires PHP: 5.2
    9 Stable tag: 3.8.2
     9Stable tag: 3.8.3
    1010Requires Plugins: woocommerce
    1111License: GPLv2 or later
  • customize-my-account-for-woocommerce/trunk/customize-my-account-for-woocommerce.php

    r3466111 r3466143  
    44    Plugin URI: https://sysbasics.com
    55    Description: Customize My account page. Add/Edit/Remove Endpoints.
    6     Version: 3.8.2
     6    Version: 3.8.3
    77    Author: SysBasics
    88    Author URI: https://sysbasics.com
  • customize-my-account-for-woocommerce/trunk/include/admin/admin_settings.php

    r3466111 r3466143  
    297297    public function add_endpoint_form_response() {
    298298       
    299         if( isset( $_POST['wcmamtx_add_endpoint_nonce'] ) && wp_verify_nonce( $_POST['wcmamtx_add_endpoint_nonce'], 'wcmamtx_nonce_hidden') ) {
    300 
    301        
    302        
    303            
    304 
    305         if (isset($_POST['nds']['row_type'])) {
    306             $row_type     = sanitize_text_field($_POST['nds']['row_type']);
    307         }
    308        
    309         if (isset($_POST['nds']['label'])) {
    310             $new_name      = sanitize_text_field($_POST['nds']['label']);
    311         }
    312 
    313 
    314 
    315         $random_number  = mt_rand(100000, 999999);
    316         $random_number2 = mt_rand(100000, 999999);
    317 
    318 
    319 
    320         switch($row_type) {
    321             case "endpoint":
    322                 $new_key   = 'custom-endpoint-'.$random_number.'';
    323             break;
    324 
    325             case "link":
    326                 $new_key   = 'custom-link-'.$random_number.'';
    327             break;
    328 
    329             case "group":
    330                 $new_key   = 'custom-group-'.$random_number.'';
    331             break;
    332 
    333             default:
    334                 $new_key   = 'custom-endpoint-'.$random_number.'';
    335             break;
    336         }
    337 
    338 
    339         $new_row_values    = array();
    340 
    341         $advancedsettings  = (array) get_option('wcmamtx_advanced_settings');
    342 
    343         if (!isset($advancedsettings) || (sizeof($advancedsettings) == 1)) {
    344             $tabs  = wc_get_account_menu_items();
    345 
    346             foreach ($tabs as $key=>$value) {
    347            
    348                 $new_row_values[$key]['endpoint_key']        = $key;
    349                 $new_row_values[$key]['endpoint_name']       = $value;
    350                 $new_row_values[$key]['wcmamtx_type']        = 'endpoint';
    351                 $new_row_values[$key]['parent']              = 'none';
    352 
    353                 $new_row_values[$key]['class']               = isset($value['class']) ? $value['class'] : "";
    354 
    355                
    356                 $new_row_values[$key]['visibleto']           = isset($value['visibleto']) ? $value['visibleto'] : "all";
    357                 $new_row_values[$key]['roles']               = isset($value['roles']) ? $value['roles'] : array();
    358                 $new_row_values[$key]['icon_source']         = "default";
    359                 $new_row_values[$key]['icon']                = isset($value['icon']) ? $value['icon'] : "";
    360                 $new_row_values[$key]['content']             = isset($value['content']) ? $value['content'] : "";
    361                 $new_row_values[$key]['show']                = isset($value['show']) ? $value['show'] : "yes";
    362                 $new_row_values[$key]['upload_icon']         = isset($value['upload_icon']) ? $value['upload_icon'] : "";
    363 
    364             }
    365 
    366         } else {
    367            
    368 
    369             foreach ($advancedsettings as $key2=>$value2) {
    370 
    371                 $key2 = isset($value2['endpoint_key']) ? $value2['endpoint_key'] : $key2;
    372 
    373 
    374            
    375                 $new_row_values[$key2]['endpoint_key']        = $key2;
    376                 $new_row_values[$key2]['endpoint_name']       = $value2['endpoint_name'];
    377                 $new_row_values[$key2]['wcmamtx_type']        = $value2['wcmamtx_type'];
    378                 $new_row_values[$key2]['parent']              = $value2['parent'];
    379                
    380                 $new_row_values[$key2]['class']               = isset($value2['class']) ? $value2['class'] : "";
    381                 $new_row_values[$key2]['visibleto']           = isset($value2['visibleto']) ? $value2['visibleto'] : "all";
    382                 $new_row_values[$key2]['roles']               = isset($value2['roles']) ? $value2['roles'] : array();
    383                 $new_row_values[$key2]['icon_source']         = isset($value2['icon_source']) ? $value2['icon_source'] : "default";
    384                 $new_row_values[$key2]['icon']                = isset($value2['icon']) ? $value2['icon'] : "";
    385                 $new_row_values[$key2]['show']                = isset($value2['show']) ? $value2['show'] : "yes";
    386                 $new_row_values[$key2]['upload_icon']         = isset($value2['upload_icon']) ? $value2['upload_icon'] : "";
    387 
    388                 $default_color = wcmamtx_get_default_tab_color($key2);
    389 
    390                 $default_color_font = '#334155';
    391 
    392 
    393                 $new_row_values[$key2]['dash_back_color']                = isset($value2['dash_back_color']) ? $value2['dash_back_color'] : $default_color;
    394                 $new_row_values[$key2]['dash_font_color']         = isset($value2['dash_font_color']) ? $value2['dash_font_color'] : $default_color_font;
    395 
    396                 $new_row_values[$key2]['third_party']        = isset($value2['third_party']) ? $value2['third_party'] : null;
    397                
    398 
    399                 if (isset($value2['wcmamtx_type']) && ($value2['wcmamtx_type'] == "link")) {
    400                     $new_row_values[$key2]['link_inputtarget']              = $value2['link_inputtarget'];
    401                     $new_row_values[$key2]['link_targetblank']              = $value2['link_targetblank'];
    402                 }
    403 
    404 
    405                 if (isset($value2['wcmamtx_type']) && ($value2['wcmamtx_type'] == "endpoint")) {
    406                     $new_row_values[$key2]['content']              = isset($value2['content']) ? $value2['content'] : "";
    407                 }
    408 
    409 
    410 
    411                 if (isset($value2['wcmamtx_type']) && ($value2['wcmamtx_type'] == "group")) {
    412 
    413                     $new_row_values[$key2]['group_open_default']   = isset($value2['group_open_default']) ? $value2['group_open_default'] : "no";
    414 
    415                 }
    416 
    417 
    418                  if ($key2 == "dashboard") {
    419                     $new_row_values[$key2]['hide_dashboard_hello']            = isset($value2['hide_dashboard_hello']) ? $value2['hide_dashboard_hello'] : 00;
    420                     $new_row_values[$key2]['hide_intro_hello']                = isset($value2['hide_intro_hello']) ? $value2['hide_intro_hello'] : 00;
    421                     $new_row_values[$key2]['content_dash']                    = isset($value2['content_dash']) ? $value2['content_dash'] : "";
    422                 }
    423                
    424                
    425            
    426 
    427             }
    428 
    429         }
    430 
    431 
    432 
    433 
    434             if (isset($new_name) && ($new_name != '')) {
    435                 $new_row_values[$new_key]['endpoint_key']        = $new_key;
    436                 $new_row_values[$new_key]['endpoint_name']       = $new_name;
    437                 $new_row_values[$new_key]['wcmamtx_type']        = $row_type;
    438                 $new_row_values[$new_key]['parent']              = 'none';
    439 
    440                 if ($row_type == "endpoint") {
    441                     $new_row_values[$new_key]['content']              = '{default_content}';
    442 
    443                     $wcmamtx_endpoint_allowed_to_add = get_option('wcmamtx_endpoint_allowed_to_add');
    444 
    445                     $wcmamtx_endpoint_allowed_to_add = $wcmamtx_endpoint_allowed_to_add - 1;
    446 
    447                    
    448                     update_option('wcmamtx_endpoint_allowed_to_add',$wcmamtx_endpoint_allowed_to_add);
    449                    
    450 
    451                    
    452                 }
    453 
    454                 if ($row_type == "group") {
    455 
    456 
    457                     $wcmamtx_groups_allowed_to_add = get_option('wcmamtx_groups_allowed_to_add');
    458 
    459                     $wcmamtx_groups_allowed_to_add = $wcmamtx_groups_allowed_to_add - 1;
    460 
    461                    
    462                     update_option('wcmamtx_groups_allowed_to_add',$wcmamtx_groups_allowed_to_add);
    463 
    464                 }
    465 
    466                 if ($row_type == "link") {
    467                     $new_row_values[$new_key]['link_inputtarget']              = esc_url(site_url());
    468                 }
    469                
    470 
    471             }
    472 
    473        
    474 
    475 
    476 
    477        
    478 
    479         if (($new_row_values != $advancedsettings) && !empty($new_row_values)) {
    480             update_option($this->wcmamtx_notices_settings_page,$new_row_values);
    481             update_option('wcmamtx_flush_rewrite_cache_required',"yes");
    482 
    483             if ($row_type == 'endpoint') {
    484                 $allowed_endpoints = get_option("wcmamtx_allowed_endpoint_trial");
    485 
    486                 if (isset($allowed_endpoints) && ($allowed_endpoints > 0))  {
    487                     $allowed_endpoints = $allowed_endpoints - 1;
    488                     update_option('wcmamtx_allowed_endpoint_trial',$allowed_endpoints);
    489                 }
    490             }
    491         }
    492 
    493         // add the admin notice
    494             $admin_notice = "success";
    495 
    496         // redirect the user to the appropriate page
    497             wp_redirect('admin.php?page=wcmamtx_advanced_settings');
    498             exit;
    499         }           
    500         else {
    501             wp_die( __( 'Invalid nonce specified','customize-my-account-for-woocommerce' ), __( 'Error','customize-my-account-for-woocommerce' ), array(
    502                 'response'  => 403,
    503                 'back_link' => 'admin.php?page=wcmamtx_advanced_settings',
    504 
    505             ) );
    506         }
     299           include("endpoint_form_response.php");
    507300    }
    508301
  • customize-my-account-for-woocommerce/trunk/include/wcmamtx_countof_functions.php

    r3466081 r3466143  
    245245            break;
    246246
     247            case "woo-wallet-balance":
     248            if ( is_plugin_active( 'woo-wallet/woo-wallet.php' ) ) {
     249                wcmamtx_render_woo_wallet_count_bubble_html($count_bubble,$hide_empty,$sidebar);
     250            }       
     251            break;
     252
     253            case "points":
     254                if ( is_plugin_active( 'points-and-rewards-for-woocommerce/points-rewards-for-woocommerce.php' ) ) {
     255
     256                    wcmamtx_render_wpswings_points_count_bubble_html($count_bubble,$hide_empty,$sidebar);
     257                }       
     258            break;
     259
    247260
    248261            case "none":
  • customize-my-account-for-woocommerce/trunk/readme.txt

    r3466111 r3466143  
    77WC Requires at least: 4.0
    88Requires PHP: 5.2
    9 Stable tag: 3.8.2
     9Stable tag: 3.8.3
    1010Requires Plugins: woocommerce
    1111License: GPLv2 or later
Note: See TracChangeset for help on using the changeset viewer.