Plugin Directory

Changeset 3461085


Ignore:
Timestamp:
02/13/2026 10:06:17 PM (6 weeks ago)
Author:
farhad0
Message:

2.1.4

Location:
woo-iran-shetab-card-field
Files:
12 added
6 edited

Legend:

Unmodified
Added
Removed
  • woo-iran-shetab-card-field/trunk/includes/DediData/class-plugin-autoloader.php

    r3033775 r3461085  
    55 * @package DediData
    66 */
    7 
    8 declare(strict_types=1);
    97
    108namespace DediData;
     
    2018    /**
    2119     * Name Spaces
    22      * 
     20     *
    2321     * @var array<string> $name_spaces
    2422     */
     
    3432    /**
    3533     * Constructor
    36      * 
     34     *
    3735     * @param array<string> $name_spaces Name Spaces.
    3836     * @return void
     
    4038    public function __construct( array $name_spaces ) {
    4139        $this->name_spaces = $name_spaces;
    42         // phpcs:ignore SlevomatCodingStandard.ControlStructures.NewWithoutParentheses.UselessParentheses
    43         $trace = ( new Exception() )->getTrace();
     40        $exception_ins     = new Exception();
     41        $trace             = $exception_ins->getTrace();
    4442        if ( ! isset( $trace[0]['file'] ) ) {
    4543            new WP_Error( 'Invalid Trace for Autoload' );
    4644        }
    47         $this->plugin_file = $trace[0]['file'];
     45        $this->plugin_file = isset( $trace[0] ) && isset( $trace[0]['file'] ) ? $trace[0]['file'] : '';
    4846        spl_autoload_register( array( $this, 'autoloader' ) );
    4947    }
     
    5250     * The autoloader function checks if a class is part of a specific plugin and includes the
    5351     * corresponding class file if it exists.
    54      * 
     52     *
    5553     * @param string $class_name The class parameter is the name of the class that needs to be auto loaded.
    56      * @return void
     54     * @return void Return
    5755     */
    58     public function autoloader( string $class_name ) {
     56    public function autoloader( string $class_name ): void {
    5957        $parts = explode( '\\', $class_name );
    6058        // Get class name from full class name
  • woo-iran-shetab-card-field/trunk/includes/DediData/class-singleton.php

    r3039005 r3461085  
    22/**
    33 * Singleton Class
    4  * 
     4 *
    55 * @package DediData
    66 */
    7 
    8 declare(strict_types=1);
    97
    108namespace DediData;
    119
    1210use WP_Error;
    13  
     11
    1412/**
    1513 * Class Singleton
     
    2119     * returned by the `getInstance()` method. It ensures that only one instance of the class is created
    2220     * and that it can be accessed globally.
    23      * 
    24      * @var object instance
     21     *
     22     * @var array<object> instance
    2523     */
    2624    private static $instances = array();
    27    
     25
    2826    /**
    2927     * The private constructor prevents direct instantiation of the class.
    30      * 
     28     *
    3129     * @param mixed $param Optional parameter.
    32      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
    3330     */
    34     private function __construct( $param ) { // phpcs:ignore SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter
     31    private function __construct( $param ) {
    3532        // still empty
    3633    }
     
    3835    /**
    3936     * The function retrieves a property value from an object if it exists, otherwise it returns an error.
    40      * 
     37     *
    4138     * @param string $property_name The parameter "property_name" is a string that represents the name of the
    4239     *                              property you want to retrieve from the current object.
     
    4441     * exist, a WP_Error object is returned with the message "Property '' does not exist."
    4542     */
    46     public function get( string $property_name ) {
     43    final public function get( string $property_name ) {
    4744        $class_name = static::class;
    4845        if ( property_exists( $class_name, $property_name ) ) {
     
    5653     * The function sets the value of a property in a PHP class if the property exists, otherwise it
    5754     * returns an error.
    58      * 
     55     *
    5956     * @param string $property_name The name of the property you want to set the value for.
    6057     * @param mixed  $value         The value that you want to set for the property.
    61      * @return void
     58     * @return void Return
    6259     */
    63     public function set( string $property_name, $value ) {
     60    final public function set( string $property_name, $value ): void {
    6461        $class_name = static::class;
    6562        if ( ! property_exists( $class_name, $property_name ) ) {
     
    7269    /**
    7370     * The getInstance function returns an instance of the class if it doesn't already exist.
    74      * 
     71     *
    7572     * @param mixed $param Optional Parameter.
    7673     * @return object      The instance of the class.
    7774     */
    78     public static function get_instance( $param = null ) {
     75    final public static function get_instance( $param = null ) {
    7976        $class_name = static::class;
    8077        if ( ! isset( self::$instances[ $class_name ] ) ) {
     
    8683    /**
    8784     * The function uses a shared instance of a class and calls a method on it.
    88      * 
    89      * @return object The object of class
     85     *
     86     * @return mixed The object of class
    9087     */
    91     protected static function use_instance_in_function_example() {
     88    final protected static function use_instance_in_function_example() {
    9289        $instance = self::get_instance();
    9390        return $instance->$instance;
  • woo-iran-shetab-card-field/trunk/includes/ShetabCardField/class-shetab-card-field.php

    r3044089 r3461085  
    66 */
    77
    8 declare(strict_types=1);
    9 
    108namespace ShetabCardField;
    119
     
    1614 */
    1715final class Shetab_Card_Field extends \DediData\Singleton {
    18    
     16
    1917    /**
    2018     * Plugin URL
    21      * 
     19     *
    2220     * @var string $plugin_url
    2321     */
    24     private $plugin_url;
     22    protected $plugin_url;
    2523
    2624    /**
    2725     * Plugin Folder
    28      * 
     26     *
    2927     * @var string $plugin_folder
    3028     */
    31     private $plugin_folder;
     29    protected $plugin_folder;
    3230
    3331    /**
    3432     * Plugin Name
    35      * 
     33     *
    3634     * @var string $plugin_name
    3735     */
    38     private $plugin_name;
     36    protected $plugin_name;
    3937
    4038    /**
    4139     * Plugin Version
    42      * 
     40     *
    4341     * @var string $plugin_version
    4442     */
    45     private $plugin_version;
    46    
     43    protected $plugin_version;
     44
    4745    /**
    4846     * Plugin Slug
    49      * 
     47     *
    5048     * @var string $plugin_slug
    5149     */
    52     private $plugin_slug;
     50    protected $plugin_slug;
    5351
    5452    /**
    5553     * Plugin File
    56      * 
     54     *
    5755     * @var string $plugin_file
    5856     */
    59     private $plugin_file;
     57    protected $plugin_file;
    6058
    6159    /**
    6260     * Constructor
    63      * 
     61     *
    6462     * @param mixed $plugin_file Plugin File Name.
    6563     * @see https://developer.wordpress.org/reference/functions/register_activation_hook
     
    9795     * The function is used to load frontend scripts and styles in a WordPress plugin, with support for
    9896     * RTL (right-to-left) languages.
    99      * 
     97     *
    10098     * @return void
    10199     */
     
    112110        wp_register_script( $this->plugin_slug, $this->plugin_url . '/assets/public/js/script.js', array(), $this->plugin_version, true );
    113111        wp_enqueue_script( $this->plugin_slug );
    114         */   
     112        */
    115113    }
    116114
    117115    /**
    118116     * Styles for Admin
    119      * 
     117     *
    120118     * @return void
    121119     */
     
    137135    /**
    138136     * Activate the plugin
    139      * 
     137     *
    140138     * @return void
    141139     * @see https://developer.wordpress.org/reference/functions/add_option
     
    286284    /**
    287285     * Set Plugin Info
    288      * 
     286     *
    289287     * @return void
    290288     */
     
    306304    /**
    307305     * The function "run" is a placeholder function in PHP with no code inside.
    308      * 
     306     *
    309307     * @return void
    310308     */
     
    315313    /**
    316314     * The admin function includes the options.php file and registers the admin menu.
    317      * 
     315     *
    318316     * @return void
    319317     */
  • woo-iran-shetab-card-field/trunk/license.txt

    r3033775 r3461085  
    1 Copyright 2024 DediData.com
     1Copyright 2026 ParsMizban.com
    22
    33This program is free software; you can redistribute it and/or modify
  • woo-iran-shetab-card-field/trunk/readme.txt

    r3044095 r3461085  
    11=== Shetab Card Field For WooCommerce ===
    2 Contributors: dedidata, parsmizban, farhad0
     2Contributors: parsmizban, farhad0
    33Tags: woocommerce, checkout, payments, order, payment gateways
    44Requires at least: 6.0
    5 Tested up to: 6.4
    6 Requires PHP: 7.0
    7 Stable tag: 2.1.3
     5Tested up to: 6.9
     6Requires PHP: 7.4
     7Stable tag: 2.1.4
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
    10 Donate link: https://dedidata.com
     10Donate link: https://parsmizban.com
    1111
    1212Adding a field for receiving Shetab card number for WooCommerce
     
    1616
    1717Validated by:
    18 https://wpreadme.com/
     18https://wpreadme.com
    1919https://wordpress.org/plugins/developers/readme-validator
    2020
     
    2424
    2525* WordPress 6.0 or greater
    26 * PHP 7.0 or greater is required (PHP 8.0 or greater is recommended)
     26* PHP 7.4 or greater is required (PHP 8.0 or greater is recommended)
    2727* MySQL 5.6 or greater, OR MariaDB version 10.1 or greater, is required.
    2828* WooCommerce
     
    38383. click “Add New.”
    39394. In the search field type the name of this plugin and then click “Search Plugins.”
    40 5. Once you’ve found us,  you can view details about it such as the point release, rating, and description.
     405. Once you’ve found us, you can view details about it such as the point release, rating, and description.
    41416. Most importantly of course, you can install it by! Click “Install Now,” and WordPress will take it from there.
    42427. Activate the plugin from your Plugins page
     
    6666= 2.1.1 =
    6767Some Bugs Fixed
     68
    6869= 2.1.0 =
    6970Whole code rewritten and compatible with new WP version and PHP
     71
    7072= 1.0.0 =
    71 * First Version
     73* First Release
  • woo-iran-shetab-card-field/trunk/shetab-card-field.php

    r3044089 r3461085  
    33 * Plugin Name: Shetab Card Field For WooCommerce
    44 * Description: This plugin adds a field for receiving Shetab card number in orders form in WooCommerce.
    5  * Plugin URI: https://dedidata.com
    6  * Author: DediData
    7  * Author URI: https://dedidata.com
    8  * Version: 2.1.3
     5 * Plugin URI: https://parsmizban.com
     6 * Author: ParsMizban
     7 * Author URI: https://parsmizban.com
     8 * Version: 2.1.4
    99 * Requires at least: 6.0
    10  * Tested up to: 6.4
    11  * Requires PHP: 7.0
     10 * Tested up to: 6.9
     11 * Requires PHP: 7.4
    1212 * License: GPL v3
    1313 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    1616 * @package Shetab_Card_Field
    1717 */
    18 
    19 declare(strict_types=1);
    2018
    2119if ( ! defined( 'ABSPATH' ) ) {
     
    3129 *
    3230 * @return object an instance of the \ShetabCardField\SHETAB_CARD class.
    33  * @SuppressWarnings(PHPMD.StaticAccess)
    3431 */
    35 function SHETAB_CARD_FIELD() { // phpcs:ignore Squiz.Functions.GlobalFunction.Found, WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
     32function SHETAB_CARD_FIELD() {
    3633    return \ShetabCardField\Shetab_Card_Field::get_instance( __FILE__ );
    3734}
Note: See TracChangeset for help on using the changeset viewer.