Plugin Directory

Changeset 3261427


Ignore:
Timestamp:
03/25/2025 10:25:31 AM (12 months ago)
Author:
DaveFX
Message:

Deploy from Git

Location:
dfx-woo-role-changer/trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • dfx-woo-role-changer/trunk/dfx-woo-role-changer.php

    r3234638 r3261427  
    44 * Plugin Name: DFX Automatic Role Changer for WooCommerce
    55 * Description: Allows the automatic assignation of roles to users on product purchases in WooCommerce
    6  * Version:     20250204
     6 * Version:     20250325
    77 * Author:      David Marín Carreño
    88 * Author URI:  https://davefx.com
     
    2424 *
    2525 * @package   DFX-Woo-Role-Changer
    26  * @version   20250204
     26 * @version   20250325
    2727 * @author    David Marín Carreño <davefx@davefx.com>
    2828 * @copyright Copyright (c) 2020-2025 David Marín Carreño
     
    3232 */
    3333defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
    34 const DFX_WOO_ROLE_CHANGER_VERSION = '20250204';
     34const DFX_WOO_ROLE_CHANGER_VERSION = '20250325';
    3535if ( function_exists( 'dfx_woo_role_changer_fs' ) ) {
    3636    dfx_woo_role_changer_fs()->set_basename( false, __FILE__ );
     
    314314            foreach ( $order_product_items as $order_product_item ) {
    315315                $role = get_post_meta( $order_product_item->get_product_id(), '_dfxwcrc_role_assignment', true );
    316                 if ( empty( $role ) || empty( trim( $role ) ) ) {
    317                     continue;
    318                 }
    319                 $roles_for_product = explode( ',', $role );
    320                 foreach ( $roles_for_product as $role_for_product ) {
    321                     $role_for_product = trim( $role_for_product );
    322                     if ( $role_for_product !== 'none' && !empty( $role_for_product ) && !in_array( $role_for_product, $roles ) ) {
    323                         $roles[] = $role_for_product;
     316                if ( !empty( $role ) && !empty( trim( $role ) ) ) {
     317                    $roles_for_product = explode( ',', $role );
     318                    foreach ( $roles_for_product as $role_for_product ) {
     319                        $role_for_product = trim( $role_for_product );
     320                        if ( $role_for_product !== 'none' && !empty( $role_for_product ) && !in_array( $role_for_product, $roles ) ) {
     321                            $roles[] = $role_for_product;
     322                        }
    324323                    }
    325324                }
  • dfx-woo-role-changer/trunk/readme.txt

    r3234638 r3261427  
    55Requires at least: 3.1
    66Tested up to: 6.6
    7 Stable tag: 20250204
     7Stable tag: 20250325
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    2121
    2222* Integrates seamlessly with WooCommerce.
     23
     24* *Premium*: Supports the definition of different roles for variations in variable products.
    2325
    2426* *Premium*: Allows defining, per product, a role validity period in days after the purchase, so the role granted in the purchase will be automatically removed after that period.
     
    148150== Changelog ==
    149151
     152= 20250325 =
     153
     154* *Premium*: Added support for definition of roles in variations of variable products.
     155
     156* *Premium*: In case of having one order with several products granting the same role, we can now select how to calculate the validity period (if defined).
     157
    150158= 20250204 =
    151159
Note: See TracChangeset for help on using the changeset viewer.