strangerstudios / pmpro-woocommerce

Connect Paid Memberships Pro with WooCommerce and WooCommerce Subscriptions to sell membership products and offer members-only product discounts.
https://www.paidmembershipspro.com/add-ons/pmpro-woocommerce/
46 stars 32 forks source link

Compatibility issues with Gravity Forms Product Addons and Woocommerce Product Addons Plugins #30

Closed scarchedi closed 1 year ago

scarchedi commented 8 years ago

When pmpro-woocommerice is activated and a member discount price is applied to a product the product's cost-based add-ons (with either with gravity forms addons or woocommerce addons plugin) is not added to the cart.

For example: Product A - non-members price: $15 with $9 add-on is showing as $15 in the cart When I remove the member discounted price the total is shown correctly.

Caesar113 commented 7 years ago

I second this issue. I rolled back to 1.2.11 to see if this issue was introduced recently, but the issue persisted in the old version. I've had to resort to duplicating products--one for members and one for non-members with different pricing and then restricting the product with the Paid Memberships Pro - Custom Post Type Add On plugin. This is obviously only a workaround and not a viable solution.

I have attached screenshots so you can see what I mean. The member price should be used as the base price for the product and then allowing the add-ons to be built off of that discounted member price. Instead, the member price is overriding the base price + all of the add-ons so the final price is always simply what was set as the member price no matter how many add-ons are added.

@strangerstudios Can you please weigh in on this? I have an event season coming up and having duplicate products for every ticket type for members and non-members is going to be very confusing for the customer.

screen shot 2017-03-02 at 9 33 36 am screen shot 2017-03-02 at 9 34 02 am
Caesar113 commented 7 years ago

@strangerstudios Can you please follow-up on this? This issue was opened close to a month ago. This is causing a major headache for my organization and I'm guessing @scarchedi is going through similar pains. Thank you!

Caesar113 commented 7 years ago

@strangerstudios I misread the year this issue was posted. This has been open for a FULL YEAR now? Can we please get this resolved? This is a paid product. The plug-in states to report issues here. There seems to be many issues reported here which you simply have not followed up on. This is very poor customer service. There aren't that many open issues where you can't take the time to read, diagnose them, and report back whether this is something you plan to fix, and if so, give a timeline.

Caesar113 commented 7 years ago

@strangerstudios If anyone is actually reading this, I'm confused by the lack of attention to the GitHub issues here. This is what you specifically request in the FAQs and there seems to be no attention given through this forum whatsoever.

From your own documentation:

= I found a bug in the plugin. =

Please post it in the issues section of GitHub and we'll fix it as soon as we can. Thanks for helping. https://github.com/strangerstudios/pmpro-woocommerce/issues

The wordpress.org support page seems to be largely ignored as well. Can you please advise how we should report bugs to actual have them tended to? And can someone please, please look into this issue? Thank you.

Caesar113 commented 7 years ago

@strangerstudios Anyone? Bueller? Bueller? Bueller?

Caesar113 commented 7 years ago

@strangerstudios ???

climbwasatch commented 7 years ago

I am also having this issue. The following needs to check for the Gravity Forms Woocommerce Options price before setting the price:

// use cart membership level price if set, otherwise use current member level
if (isset($cart_membership_level)) {
    $level_price = '_level_' . $cart_membership_level . '_price';
    $level_id = $cart_membership_level;
} elseif (pmpro_hasMembershipLevel()) {        
    $level_price = '_level_' . $current_user->membership_level->id . '_price';
    $level_id = $current_user->membership_level->id;
} else {
    return $price;
}

// use this level to get the price
if (isset($level_price)) {
    $level_price = get_post_meta($product->get_id(), $level_price, true);
    if(!empty($level_price) || $level_price === '0' || $level_price === '0.00' || $level_price === '0,00') {
        $discount_price = $level_price;
    } 

    // apply discounts if there are any for this level
    if(isset($level_id) && !empty($pmprowoo_member_discounts) && !empty($pmprowoo_member_discounts[$level_id])) {
        $discount_price  = $discount_price - ( $discount_price * $pmprowoo_member_discounts[$level_id]);
    }
}       

return $discount_price;

}

climbwasatch commented 7 years ago

I also started a thread here: https://wordpress.org/support/topic/woocommerce-gravity-form-add-on-and-pmp/

Caesar113 commented 7 years ago

@climbwasatch Thanks for adding another voice behind this issue! Seems to happen with both Gravity Forms Add-ons and WooCommerce Add-ons. @strangerstudios Can you please look into this?

climbwasatch commented 7 years ago

I've also opened a support forum thread on PMP support forum: https://www.paidmembershipspro.com/forums/topic/pmp-member-price-overriding-gravity-forms-woocommerce-add-on/

climbwasatch commented 7 years ago

Two plugins were setting the same priority for the price and PMP code loads after the gravity forms thus taking price priority. It was recommended I alter these priorities with the following code to the theme functions.php file. I added this filter and still no luck. I have one of the PMP developers looking into this and I will update this thread as soon as I have more.

// Get PMPro WooCommerce price earlier function my_pmprowoo_init() { // only change price if this is on the front end if ( ! is_admin() || defined( 'DOING_AJAX' ) ) { remove_filter( "woocommerce_product_get_price", "pmprowoo_get_membership_price", 10, 2 ); add_filter( "woocommerce_product_get_price", "pmprowoo_get_membership_price", 5, 2 ); remove_filter( "woocommerce_product_variation_get_price", "pmprowoo_get_membership_price", 10, 5 ); add_filter( "woocommerce_product_variation_get_price", "pmprowoo_get_membership_price", 5, 5 ); remove_filter( "woocommerce_variable_price_html", "pmprowoo_woocommerce_variable_price_html", 10, 2 ); add_filter( "woocommerce_variable_price_html", "pmprowoo_woocommerce_variable_price_html", 5, 2 ); } } add_action('init', 'my_pmprowoo_init');

climbwasatch commented 7 years ago

Just noting this here as well since it's a similar issue. Taking PMP out of the equation, there is still some pricing issue with Gravity Forms Woocommerce Add On and Woocommerce. I'm continuing to dive into the issue with woocommerce directly. It falls under the same category of pricing priority.

The top order should be $45 but get over ridden from the second cart product with options attached, equaling $50 thus over ridding the top products price.

https://aicaonline.org/wp-content/uploads/2017/05/Screen-Shot-2017-05-25-at-8.34.02-AM.png

Caesar113 commented 6 years ago

@climbwasatch Did you ever get this sorted out? We're about to sell tickets for another event where I'll experience this issue. TIA!

andrewlimaza commented 1 year ago

Because there have not been any recent updates to this issue, we will be closing the issue. If you are still experiencing this issue, please open a new issue with updated information describing the bug and how to replicate it.

Thank you for understanding.