Darryl.R
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] manage_woocommerce_orders capabilityHi Mike
Yes, I use User Role Editor.
Forum: Plugins
In reply to: [WooCommerce] manage_woocommerce_orders capabilityNo Luck, even with just Woocommerce and a user role plugin installed the capability is not there.
Forum: Plugins
In reply to: [WooCommerce] manage_woocommerce_orders capabilityI’m using storefront already, and I’ve tried this – but lets give it a go again!
Thanks
Forum: Plugins
In reply to: [WooCommerce] manage_woocommerce_orders capabilityThanks Caleb, but yes – I’ve tried that, no joy.
Forum: Plugins
In reply to: [User Role Editor] Manage Woocommerce Orders Capability not visibleI’ve duplicated all the plugins used on the other websites, still nothing.
Can perhaps I add the capability via the functions.php of my child theme?
Ok, looks like i got it to work.
This is what I needed to do:
1. Enable PHP in my widget by adding this code to the functions.php file:
add_filter('widget_text','execute_php',100); function execute_php($html){ if(strpos($html,"<"."?php")!==false){ ob_start(); eval("?".">".$html); $html=ob_get_contents(); ob_end_clean(); } return $html; }
2. Function to run the slider shortcode depending on the page ID:
add_action('soliloquy','hp_slider'); function hp_slider() { if (!is_page(105)) { return $html; } else { echo do_shortcode('[soliloquy id="1599"]'); } }
3. Call PHP function in the widget:
<?php hp_slider(); ?>
Thanks for the help!
Hi Erica
Thanks for the reply!
It still doesn’t work – but at least the website doesn’t break!
I think I need to call the function from the widget? My thinking was to prevent the shortcode from running unless its the correct page. So I’m not sure if do_shortcode() is the correct why to go about it?
Hi Akyusa01
Thanks for the feedback.
I’m using a child theme, but I would prefer to leave the page templates as stock as possible and rather do any changes via the functions.php file, hence looking for a solution to inhibit the display of the slider to selected pages.
Forum: Plugins
In reply to: [WP Super Cache] Disable caching for non-membersThanks for the feedback – I will check out WP Object Cache
Forum: Plugins
In reply to: [User Role Editor] Manage Woocommerce Orders Capability not visibleThanks Vladimir
I will try to find out if there is another plugin adding this custom capability.
Forum: Plugins
In reply to: [User Role Editor] Manage Woocommerce Orders Capability not visibleHi Vladimir
Thanks for the reply;
Yes I did use the reset capabilities tool.
The capability is the manage_woocommerce_orders capability – Upon further investigation, I think its activated/added by the “WooCommerce Print Invoice & Delivery Note” plugin.
I’ve added this plugin to my site as well, but no luck. Any idea why this capability is not coming up? I will follow up with the other plugin developer as well.
Thank you!
Forum: Plugins
In reply to: Blank Error Notification on the Plugin PageNever mind – It seems to be “WooCommerce Restrict Categories Plus” creating the issue.
Forum: Plugins
In reply to: [Nav Menu Roles] Compatibility Issue with Max Mega MenuYes, I mean the front-end.
It’s been working without issue for at least a year now without any issues until the most recent update?
Thanks
Forum: Plugins
In reply to: [WooCommerce] missing SKU from emailI solved this by adding a filter and function in my child theme’s functions.php file.
// Filter to override includes abstracts abstract-wc-order array defaults to allow SKU to show in email depot-processing-order add_filter('email_order_items_table');
// Override includes abstracts abstract-wc-order defaults array for email order items table function function email_order_items_table($defaults) { $defaults = array( 'show_sku' => true, 'show_image' => false, 'image_size' => array( 32, 32 ), 'plain_text' => false ); }
Forum: Plugins
In reply to: [WooCommerce] missing SKU from emailOk, so I did some scratching, and I found that this file woocommerce/includes/abstracts/abstract-wc-order.php on line 1951 the sku is set to false by default. When I changed it to true my email works.
public function email_order_items_table( $args = array(), $deprecated1 = null, $deprecated2 = null, $deprecated3 = null, $deprecated4 = null, $deprecated5 = null ) { ob_start(); if ( ! is_null( $deprecated1 ) || ! is_null( $deprecated2 ) || ! is_null( $deprecated3 ) || ! is_null( $deprecated4 ) || ! is_null( $deprecated5 ) ) { _deprecated_argument( __FUNCTION__, '2.5.0' ); } $defaults = array( 'show_sku' => true, 'show_image' => false, 'image_size' => array( 32, 32 ), 'plain_text' => false );
I tried to add this to my Woocommerce folder in my child theme, but it only works if I change the original Woocommerce file.
Any suggestions on the best way of implementing this without modifying the original Woocommerce files?
Thank you