Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter excelvbaisfun

    (@excelvbaisfun)

    Hi Jose,
    I’m embarrassed to say the plugin primarily at fault was one I made because LearnDash support told me to. Basically, when I want to see a dropdown list of courses for when I’m designing coupon settings, it wasn’t showing a list of courses.

    This code was given to me either by LearnDash support or Advanced Coupons plugin.
    The error was something about duplicate declaration, so I guess I need it deactivated when not adjusting coupons…

    <?php
    /*
    Plugin Name: Dan's Advanced Coupons Prod Finder
    Author: Dan Strong
    Version: 1.1
    Description: Allows Courses and Virtual Products to be found in Coupon Options
    */
    
    add_filter( 'acfw_product_search_allowed_types' , 'acfw_search_add_support_for_course' );
    
    function acfw_search_add_support_for_course( $product_types ) {    $product_types[] = 'course';
    
        return $product_types;
    
    }
    
    /*
    '03/08/22 ds 
    PHP Snippet: Apply coupon to WooCommerce cart via url
    from https://www.webroomtech.com/apply-coupon-via-url-in-woocommerce/
    
    */
    
    function webroom_woocommerce_coupon_links(){
    
    	// Bail if WooCommerce or sessions aren't available.
    
    	if (!function_exists('WC') || !WC()->session) {
    		return;
    	}
    
    	/**
    	 * Filter the coupon code query variable name.
    	 *
    	 * @since 1.0.0
    	 *
    	 * @param string $query_var Query variable name.
    	 */
    	$query_var = apply_filters('woocommerce_coupon_links_query_var', 'coupon_code');
    
    	// Bail if a coupon code isn't in the query string.
    
    	if (empty($_GET[$query_var])) {
    		return;
    	}
    
    	// Set a session cookie to persist the coupon in case the cart is empty.
    
    	WC()->session->set_customer_session_cookie(true);
    
    	// Apply the coupon to the cart if necessary.
    
    	if (!WC()->cart->has_discount($_GET[$query_var])) {
    
    		// WC_Cart::add_discount() sanitizes the coupon code.
    
    		WC()->cart->add_discount($_GET[$query_var]);
    	}
    }
    add_action('wp_loaded', 'webroom_woocommerce_coupon_links', 30);
    add_action('woocommerce_add_to_cart', 'webroom_woocommerce_coupon_links');

    Thanks for the other info. I’m running tests, but I may have finally got all my checkout pages to stop randomly dropping items from the cart – thanks for Freesoul.

    Thanks, thanks, THANKS!
    Dan

    Thread Starter excelvbaisfun

    (@excelvbaisfun)

    Thanks, Jose! Because of your debug trick, I was able to disable a plugin and Freesoul will now load.

    Question – how do I make sure the post types thing will override the single pages? Not sure if I have it checked correctly.
    Thanks
    Dan

    Thread Starter excelvbaisfun

    (@excelvbaisfun)

    Thank you. Cloudways server shows running PHP 7.4 with MariaDB 10.4

    Does that help? Thanks, Dan

    Thread Starter excelvbaisfun

    (@excelvbaisfun)

    Apologies, WP_DEBUG is set to false and I don’t have WP_DEBUG_LOG in there as of yet.

    The server through cloudflare keeps logs, that’s what I was referring to.

    I had 1.9.2.2, but tried the 1.9.2.3beta-2 but still critical errors.

    Nothing new really, it has done this for a long time, I just now thought I need to finally get some help since I can only use freesoul on each individual page and no global settings.

    Thanks
    Dan

    Ok I just noticed an update is available for LearnDash/Woocommerce integration and the log says it has to do with login required issues. So I’m going to update this and let you know if a support ticket to LearnDash is actually needed. Hopefully this is fixed!

    My customers are getting this on my Learndash site also! Submitting a ticket to LearnDash, thanks for confirming my suspicions.
    Dan

    Thread Starter excelvbaisfun

    (@excelvbaisfun)

    Hi Jose,
    Thanks for the info!
    It seems to be working better now, probably the caching like you said.

    I’m having trouble getting it to work with my LearnDash lessons. I see on the default page there’s a post type “Lessons”, but when I set, save, clear cache and do a hard-refresh on the lesson I’m on, nothing changes. I also tried Archives-> Lessons Archives, but it also had no effect.

    I guess I’m not sure what I’m doing wrong.

    Love your plugin, it’s helped me speed up some sales pages that I’m sure will really help a lot in the future to get more sales!

    Thanks
    Dan

    Hi @hienphan,

    I’m also unable to import any courses using this tool. My site is goDaddy hosted, so hopefully no server issues (not sure). I’m using Learnpress under the ‘Coursaty’ theme.

    couple problems:
    1. When I export a single course (as a test) and then try to open in excel and then export it back to XML format, it always give me an error. Is there a way to use Excel to edit the XML? otherwise, I’m not sure how to do this.

    2. When I opened the exported XML using a simple text editor (Notepad++), I simply tried to change the ‘_cms_wp_coursaty_course_page_title_desc’ slightly, but when I updated to newest Learnpress just now, it acted like it was importing and said ‘Done’, but nothing happened.

    3. I’d like to be able to update courses using xml, but even more so, it’s more important that I can ADD new courses from xml. Can you help me?

    Thanks very much!

    Dan

    Hello,

    I’m having the same issue. Under the ‘Publish’ section it is all blank for creating or editing a Course. The Quizzes, Questions, etc – those all work fine and have an ‘Update’ button, but the Course part doesn’t work.

    Please help! I tried de-activating EVERY plugin one at a time and none of those helped this problem.

    Thanks

    Dan

Viewing 9 replies - 1 through 9 (of 9 total)