Plugin Directory

Changeset 2496511


Ignore:
Timestamp:
03/16/2021 06:44:21 AM (5 years ago)
Author:
hossain88
Message:

remove admin previlage for setting page

Location:
woo-free-product-sample/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • woo-free-product-sample/trunk/admin/class-woo-free-product-sample-admin.php

    r2446008 r2496511  
    130130    public function wfps_settings_page() {
    131131
    132         $current_user = wp_get_current_user();
    133         if( ! in_array('administrator', $current_user->roles) ) {
    134             return;
    135         }
    136 
    137132        $settings = Woo_Free_Product_Sample_Settings::wfps_setting_fields();       
    138133        return include  WFPS_ADMIN_DIR_PATH . 'partials/woo-free-product-sample-settings.php';
  • woo-free-product-sample/trunk/includes/class-woo-free-product-sample-helper.php

    r2474210 r2496511  
    144144        switch ( self::wfps_product_type() ) {
    145145            case "simple":
    146                 $button = '<button type="submit" name="simple-add-to-cart" value="'.get_the_ID().'" id="woo-free-sample-button" class="woo-free-sample-button">'.self::wfps_button_text().'</button>';
     146                $button = '<button type="submit" name="simple-add-to-cart" value="'.get_the_ID().'" id="woo-free-sample-button" class="woo-free-sample-button">'.sprintf( esc_html__( '%s', 'woo-free-product-sample' ), self::wfps_button_text() ).'</button>';
    147147                break;
    148148            case "variable":
    149                 $button = '<button type="submit" name="variable-add-to-cart" value="'.get_the_ID().'" id="woo-free-sample-button" class="woo-free-sample-button">'.self::wfps_button_text().'</button>';
     149                $button = '<button type="submit" name="variable-add-to-cart" value="'.get_the_ID().'" id="woo-free-sample-button" class="woo-free-sample-button">'.sprintf( esc_html__( '%s', 'woo-free-product-sample' ), self::wfps_button_text() ).'</button>';
    150150                break;         
    151151            default:
  • woo-free-product-sample/trunk/includes/class-woo-free-product-sample.php

    r2474210 r2496511  
    5151            $this->version = WFPS_VERSION;
    5252        } else {
    53             $this->version = '2.1.18';
     53            $this->version = '2.1.19';
    5454        }
    5555        $this->plugin_name = 'woo-free-product-sample';
  • woo-free-product-sample/trunk/public/class-woo-free-product-sample-public.php

    r2461147 r2496511  
    705705    }
    706706   
     707    /**
     708     * Woo Reviews Shortcode
     709     *
     710     * @param none
     711     * @return void
     712     **/     
     713    public function wfps_order_sample( $atts )
     714    {
     715
     716        // $atts = shortcode_atts( array(
     717        //     'product_id'    => '',                   
     718        // ), $atts );
     719
     720        // $product_id = $atts['product_id'];
     721        // $echo ='';
     722        // $echo .= '<a href="" class="woo-free-sample-button">';
     723        //  $echo .= \Woo_Free_Product_Sample_Helper::wfps_button_text();
     724        // $echo .= '</a>';
     725       
     726        // return $echo;
     727    }   
     728   
    707729}
  • woo-free-product-sample/trunk/readme.txt

    r2478349 r2496511  
    44Tags: free, product, sample, free-sample, free-product-sample, free-sample-product, woocommerce, dokan, e-commerce, ecommerce
    55Requires at least: 4.4
    6 Tested up to: 5.6
     6Tested up to: 5.7
    77WC requires at least: 3.1
    8 WC tested up to: 4.1.0
     8WC tested up to: 5.1.0
    99Requires PHP: 5.6
    1010Stable tag: 3.0.1
     
    232232= 2.1.18 =
    233233Remove Add to cart button common class
     234
     235= 2.1.19 =
     236Remove admin privilege for setting page
  • woo-free-product-sample/trunk/woo-free-product-sample.php

    r2478348 r2496511  
    88 * Plugin Name:       Free Product Sample for WooCommerce
    99 * Plugin URI:        https://wordpress.org/plugins/woo-free-product-sample
    10  * Description:       Display an add to cart button in the product detail page to order product as free sample
    11  * Version:           2.1.18
     10 * Description:       It allows customers to order a product sample in a simple way
     11 * Version:           2.1.19
    1212 * Author:            TheNextWP
    13  * Author URI:        https://www.thenextwp.co
     13 * Author URI:        https://thenextwp.co
    1414 * License:           GPL-2.0+
    1515 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
     
    1818 * Requires PHP:      5.6
    1919 * Requires at least: 4.4
    20  * Tested up to:      5.6
     20 * Tested up to:      5.7
    2121 *
    2222 * WC requires at least: 3.1
    23  * WC tested up to:   4.9.1
     23 * WC tested up to:   5.1.0
    2424 * License: GNU General Public License v3.0
    2525 * License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    3131}
    3232
    33 define( 'WFPS_VERSION', '2.1.18' );
     33define( 'WFPS_VERSION', '2.1.19' );
    3434define( 'WFPS_MINIMUM_PHP_VERSION', '5.6.0' );
    3535define( 'WFPS_MINIMUM_WP_VERSION', '4.4' );
Note: See TracChangeset for help on using the changeset viewer.