Forum Replies Created

Viewing 15 replies - 1 through 15 (of 33 total)
  • Getting the same error with latest version update 3.1.6 – Released on 06 March 2024.

    Fatal error: Uncaught Error: Call to undefined function cal_days_in_month() in /wp-content/plugins/mwb-bookings-for-woocommerce/public/class-mwb-bookings-for-woocommerce-public.php:

    @andreiigna, it seems that the link to purchase the premium version is no linger working. This is the link you provide on the plugin admin settings screen, /wp-admin/themes.php?page=if-menu

    Jayson T Cote

    (@askjayson)

    @andreiigna – I am getting this same error. Its regarding the WooCommerce Memberships 3rd party integration and accessing the membership plan object property ‘id’ case sensitivity.

    $membershipsOptions[$plan->ID] = $plan->name; throws the error

    $membershipsOptions[$plan->id] = $plan->name; works

    Thread Starter Jayson T Cote

    (@askjayson)

    @lukecavanagh – that may just do the trick. I thought I had tried both filters. I will let you know how it goes here in a few. Luke, have you had any luck filtering by date as well? I’m assuming its the same parameter structure, i.e.

    
    'filter[created_at_min]' => '2016-01-01' 
    'filter[created_at_max]' => '2016-01-31'
    

    Thanks for your help!

    • This reply was modified 9 years, 8 months ago by Jayson T Cote.
    Thread Starter Jayson T Cote

    (@askjayson)

    Thanks @lukecavanagh, Yes no reference for order meta in the API docs. I have set an order custom field, then updating the custom field value, once the order is submitted. The custom field is used to filter orders using the WC API by a 3rd party. We can return orders through the API, but we need to return only the orders with the custom field and value. FYI, using the php library (API wrapper) https://github.com/woothemes/wc-api-php/

    Create field

    
    function gum_woo_order_fields_custom( $fields ) {
    
    	$fields['order']['aaatex_qb' ] = array(
    		'label'     	=> __('QB Import', 'woocommerce'),
    		'placeholder'   => _x('aaatex 1', 'placeholder', 'woocommerce'),
    		'required'  	=> false,
    		'class'     	=> array('hidden2'),
    		'clear'     	=> true,
    		//'default'     	=> 'new',
    	);
    	
        return $fields;
    }
    

    Update field

    
    function gum_woo_order_fields_custom_update( $order_id ) {
    	update_post_meta( $order_id, 'aaatex_qb', 'new' );
    }
    

    API Get and Response

    
    $store_url = 'http://shop.lifespa.com';
    	//$store_url = rawurlencode( rtrim( $store_url, '/' ) );
    	$consumer_key = 'ck_b19dd8998398a762d0a5062e9fd1cef1c38bdcf1';
        $consumer_secret = 'cs_12bb4182989d216d02a773586d680d481caef086';
        
    	
    	$woocommerce = new Client(
    	    $store_url, 
    	    $consumer_key, 
    	    $consumer_secret,
    	    [
    	        'wp_api' => true,
    	        'version' => 'wc/v1',
    	        'timeout' => 1000,
    	        'query_string_auth' => false // Force Basic Authentication as query string true and using under HTTPS
    	    ]
    	);
    	
    	try {
    	    // Array of response results.
    	    //$results = $woocommerce->get('customers');
    	    // Example: ['customers' => [[ 'id' => 8, 'created_at' => '2015-05-06T17:43:51Z', 'email' => ...
    	
    	    // Last request data.
    	    $lastRequest = $woocommerce->http->getRequest();
    	    //$lastRequest->getUrl(); // Requested URL (string).
    	    //$lastRequest->getMethod(); // Request method (string).
    	    //$lastRequest->getParameters(); // Request parameters (array).
    	    //$lastRequest->getHeaders(); // Request headers (array).
    	    //$lastRequest->getBody(); // Request body (JSON).
    	
    	    // Last response data.
    	    $lastResponse = $woocommerce->http->getResponse();
    	    //$lastResponse->getCode(); // Response code (int).
    	    //$lastResponse->getHeaders(); // Response headers (array).
    	    //$lastResponse->getBody(); // Response body (JSON).
    	    
    	} catch (HttpClientException $e) {
    		print '<pre>';
    	    $e->getMessage(); // Error message.
    	    $e->getRequest(); // Last request data.
    	    $e->getResponse(); // Last response data.
    	    print '</pre>';
    	}
    	
    	$api_data = [
    		'id'				=> 3520,
    		'customer_id' 		=> 2,
    		'status'			=> 'on-hold',
    	    'filter[meta]' 		=> 'true',
    	    	'order_meta' 		=> array(
    		    	'aaatex_qb' 		=> 'new',
    	    	),
    	];
    	
    	$results = $woocommerce->get('orders', $api_data );
    
    	
    	print '<pre>';
    	print_r($results);
    	print '</pre>';
    
    • This reply was modified 9 years, 8 months ago by Jayson T Cote. Reason: Render code better
    Thread Starter Jayson T Cote

    (@askjayson)

    Well deserved, thanks for all your help!
    Great Plugin, Awesomer Developer & Support By askjayson, May 14, 2015 for WP 4.2.2
    The Youtube Channel Plugin is well built and maintained. Each feature and function works as expected. It is actively maintained and updated. Support is responsive within a timely manner and super attentive. I evaluate so many plugins that do not meet quality and support standards. The Youtube Channel Plugin exceeded my expectations.

    Thread Starter Jayson T Cote

    (@askjayson)

    You rock! I am so sorry to take you time, but I truly am very appreciative. what was the issue, if you don’t mind?

    Thread Starter Jayson T Cote

    (@askjayson)

    Still no luck. Can not get a display like https://goo.gl/H2OsIu/
    Be happy to give you WP admin access?

    Using [youtube_channel num=7 responsive=1 class=ytc_wall_1-6 resource=2 playlist=PLNjUtPczX6bgivdrUSIT3fo1CD7AZTWYh display=thumbnail]

    http://sweeteners.wpengine.com/video-gallery/?ytc_force_recache=1

    Thread Starter Jayson T Cote

    (@askjayson)

    @ Alek, just wanted to ensure you saw this error, since the ‘random’ param has been removed from the UI but not in the code base

    Notice: Undefined index: random in …./ wp-content/plugins/youtube-channel/youtube-channel.php on line 365

    Thread Starter Jayson T Cote

    (@askjayson)

    Now I have

    [youtube_channel num=7 responsive=1 class=ytc_wall_1-6 resource=2 playlist=PLNjUtPczX6bgivdrUSIT3fo1CD7AZTWYh display=thumbnail]

    and shows error

    Notice: Undefined index: random in …./ wp-content/plugins/youtube-channel/youtube-channel.php on line 365

    Thread Starter Jayson T Cote

    (@askjayson)

    I see you removed the only_pl param from the admin UI, but its still set in the DB?

    {“date”:”Thu, 14 May 2015 19:58:35 +0000″,”server”:”Apache”,”php”:”5.3.2-1ubuntu4.30″,”wp”:”4.2.2″,”ytc”:”3.0.6″,”url”:”http:\/\/sweeteners.wpengine.com”,”for”:”global”,”vanity”:”WholesomeSweeteners”,”channel”:”UCqYkwrDWRNWfF6CE5pOo-tQ”,”username”:”WholesomeSweeteners”,”playlist”:”PLNjUtPczX6bgivdrUSIT3fo1CD7AZTWYh”,”resource”:2,”only_pl”:1,”cache”:7200,”fetch”:12,”num”:12,”privacy”:0,”random”:0,”ratio”:3,”width”:640,”responsive”:1,”display”:”thumbnail”,”themelight”:0,”controls”:0,”autoplay”:0,”autoplay_mute”:0,”norel”:0,”showtitle”:1,”showdesc”:1,”desclen”:100,”descappend”:”\u2026″,”modestbranding”:0,”hideanno”:0,”hideinfo”:0,”goto_txt”:”Visit our Wholesome!\u2122 Youtube channel”,”showgoto”:1,”popup_goto”:2,”link_to”:2}

    Thread Starter Jayson T Cote

    (@askjayson)

    When I remove the Playlist ID, it does not reset to plugin defaults, only the last saved value. I have the latest version installed 3.0.6, using the shortcode you provided in the screenshot, but Alek I can not get it to display as shown in your example. How can I reset all admin settings to defaults?

    Thread Starter Jayson T Cote

    (@askjayson)

    OK did some more troubleshooting and found when all default params are set in the admin 1 – default playlist ID
    2 – resource as playlist
    3 – checked value for Enable this option to embed whole playlist instead single video from playlist when you chose playlist as resource.

    Using shortcode [youtube_channel] displays the playlist video (with thumbnails embedded in the video, but not below)

    Using shortcode with param [youtube_channel only_pl=0] errors.
    Unchecking Enable this option to embed whole playlist also errors.

    Seems to be a conflict with the only_pl=0, only_pl=1 parameter not working correctly.

    Thread Starter Jayson T Cote

    (@askjayson)

    On another note. I have set all the default parameters in the settings admin and just tried using the shortcode without any custom params and still get the error and no video display.

    Thread Starter Jayson T Cote

    (@askjayson)

Viewing 15 replies - 1 through 15 (of 33 total)