SoLoGHoST
Forum Replies Created
-
Forum: Plugins
In reply to: [Broadcast] Broadcast only 1 Taxonomy, exclude all othersAwww, yes, that’s it. Adding _product_attributes to the whitelist here fixed the issue.
Forum: Plugins
In reply to: [Broadcast] Broadcast only 1 Taxonomy, exclude all othersI could be wrong here, but it seems that the _custom_attributes post meta key here is setting the value to an empty string. Any reason why this might happen? Maybe I need to add this to the protectlist or whitelist for meta keys?
'_product_attributes' => array ( 0 => 'a:1:{s:18:"pa_terminal-layout";a:6:{s:4:"name";s:18:"pa_terminal-layout";s:5:"value";s:0:"";s:8:"position";i:0;s:10:"is_visible";i:1;s:12:"is_variation";i:0;s:11:"is_taxonomy";i:1;}}', ),
Forum: Plugins
In reply to: [Broadcast] Broadcast only 1 Taxonomy, exclude all othersJust sent you an email with the html file that got generated on 1 of our staging sites where it is removing the taxonomy (custom attribute):
pa_terminal-layout
instead of replacing it with the updated value (upon changing it).Forum: Plugins
In reply to: [Broadcast] Broadcast only 1 Taxonomy, exclude all othersI can not broadcast custom taxonomies, custom attributes in Woocommerce for some reason. These would be taxonomies that were created as custom attributes. They do not get copied over to the child posts on the other sites. This is very strange behavior, so I’m not sure how to debug this and why these custom attributes in Woocommerce (taxonomy terms) are not being moved over to the other sites.
Forum: Plugins
In reply to: [Broadcast] Broadcast only 1 Taxonomy, exclude all othersCode I started for this, but doesn’t seem to work because taxonomies are not being broadcasted automatically for products:
add_filter('threewp_broadcast_broadcast_post', 'hbm_threewp_broadcast_broadcast_post', 10, 1); function hbm_threewp_broadcast_broadcast_post($bcd) { $bcd->taxonomies()->also_sync('product', 'pa_terminal-layout'); return $bcd; }
I think this doesn’t work because taxonomies are not set to broadcast by default. The settings in both taxonomy blacklist and protect list are empty as I’m thinking this is probably the best way.
Can you please help? Thanks.
Forum: Plugins
In reply to: [Broadcast] Anyway to exclude broadcasting of post_excerpt?And here is some code if anyone’s interested that adds an option to Exclude Post Excerpt or Product Short Description (for woocommerce products) within the Broadcast Metabox when broadcasting posts that are supported:
add_action('threewp_broadcast_broadcasting_started', 'maybe_not_broadcast_post_excerpt'); function maybe_not_broadcast_post_excerpt($action) { if (isset($action->broadcasting_data->_POST['broadcast'], $action->broadcasting_data->_POST['broadcast']['exclude_post_excerpt'])) unset($action->broadcasting_data->post->post_excerpt); } add_action('threewp_broadcast_prepare_meta_box', 'add_option_to_exclude_post_excerpt'); function add_option_to_exclude_post_excerpt($action) { $action->meta_box_data->html->put('horizontal_rule', '<hr />'); $label = $action->meta_box_data->post->post_type == 'product' ? __('Exclude Product Short Description') : __('Exclude Post Excerpt'); $action->meta_box_data->form->checkbox('exclude_post_excerpt')->checked(isset($action->meta_box_data->last_used_settings['exclude_post_excerpt']))->label($label)->title('Exclude Post Excerpt from being broadcasted'); $action->meta_box_data->convert_form_input_later('exclude_post_excerpt'); }
Forum: Plugins
In reply to: [Broadcast] Anyway to exclude broadcasting of post_excerpt?That did it exactly! Wow, thanks, so just learning that when
new_action
method is used, it adds an action withthreewp_broadcast_
and whatever parameter is added to it there. Super cool. Thanks very much for your help on this!Forum: Plugins
In reply to: [Broadcast] Anyway to exclude broadcasting of post_excerpt?Ok, perhaps I’m not doing something right here. Does $action need to be globalized first or perhaps it’s a filter instead?
add_action('threewp_broadcast_broadcasting_started', 'maybe_not_broadcast_post_excerpt', 10, 1); function maybe_not_broadcast_post_excerpt(&$action) { if ($action->post->post_type == 'product') unset($action->post->post_excerpt); }
This code doesn’t remove post_excerpt from being broadcasted unfortunately.
Forum: Plugins
In reply to: [Broadcast] Different Broadcast settings per site?Ok, thanks. Should definitely consider separating these setting on a site level as this would be more useful imo.
- This reply was modified 2 years, 10 months ago by SoLoGHoST. Reason: Solved
Awww, disabled the Page Confirmation and using “Text” now and it works as expected. Would be great if the Page Confirmation worked also. You should be able to target form validation success in a Gravity Form btw.
Anyways, problem solved for now.
Forum: Plugins
In reply to: [Nelio AB Testing] Custom Post Type “phl_form” need to track submissionsIs it not possible for you to provide an action or filter to hook into the tracking here? This would be preferable. We were thinking of purchasing the Premium version of this plugin as we love the charts and all, but if the premium version does not offer this, than it would be pointless for us to use it.
Can you please provide a hook for tracking stuff manually via php? Either with do_action or apply_filters?
Thanks
Forum: Plugins
In reply to: [Theme My Login] How to load user_panel.phpI assume the user-panel.php file is the dashboard, but this again, does not work. But even putting in [theme-my-login user_template=”user-panel.php”] still does not load up the user_panel.php file after being logged in.
- This reply was modified 7 years ago by SoLoGHoST.
Forum: Plugins
In reply to: [WooCommerce - Gift Cards] PHP 7 fatal errorThis is because of this in checkout.php:
$giftCard_IDs = get_post_meta ( $giftCard_id, 'wpr_existingOrders_id', true ); $giftCard_IDs[] = $order_id;
In PHP 7
$giftCard_IDs
is a string, and than directly below it, it is being assigned as an array and trying to append the$order_id
to it.I’m not entirely sure what this is supposed to do with the order id, so not entirely sure how to fix this. I’m thinking that it expects the post meta of
wpr_existingOrders_id
to be returned as an unserialized array, but instead is returning as a string.Again, not entirely sure how to fix this issue, because I’m not entirely sure if they just used the wrong variable name or if that is supposed to be an array…
It would be great if they could update this plugin so that it can be used in PHP 7!
Forum: Plugins
In reply to: [Archive Control] Advanced Custom FieldsACF option pages are a joke when it comes to what this plugin does. This plugin has the right idea to put it where it belongs. In the Post Type Submenus. Anyways, thanks again!
Forum: Plugins
In reply to: [Archive Control] Advanced Custom FieldsI just realized that is a git url you posted, for the pull request. I do a lot of coding, and am on a deadline at the moment, but will be glad to help out on git when I get the chance, which isn’t going to happen very soon unfortunately ??
Also, in the code above, I forgot to add in the acf_after_title and normal parts for ACF in the callback function, which are as follows:
<?php if (!empty($acf_positions['acf_after_title'])) echo implode('', $acf_positions['acf_after_title']); ?>
<?php if (!empty($acf_positions['normal'])) echo implode('', $acf_positions['normal']); ?>
They just need to be placed in the areas where they go in the callback
poststuff
div id.Cheers ??
- This reply was modified 7 years ago by SoLoGHoST.