Chris Rault
Forum Replies Created
-
Hi Alex,
Thanks for taking the time to reply, I really appreciate it.
I’m actually bypassing Dokan for the product forms, so my GF form is saving directly to the WC products.
I remembered it working before on my old dev site, so fired it up, tested the form and it updated the fields, but as a new product. I then realized I still had the APC feed enabled, which has the additional setting to select which fields should upload to the media library. Once I removed the APC feed, the updating stops working all together.
Being that it’s working in the APC plugin, I decided to check the media library plugin and noticed it’s using APC’s
gform_advancedpostcreation_post_after_creationaction hook:add_action( 'gform_advancedpostcreation_post_after_creation', array( $this, 'apc_custom_field_integration' ), 10, 4 )and further down:
## ADVANCED POST CREATION public function apc_custom_field_integration( $post_id, $feed, $entry, $form ) { $auto_custom_fields = array( '_product_image_gallery' /* WooCommerce product gallery */ ); /** * Filter which custom fields GP Media Library will attempt to convert to use image IDs. * * @param array $auto_custom_fields A list of custom field keys that should use image IDs. * @param int $post_id ID of the post for which custom fields are being processed. * @param array $entry The current entry ID. * @param array $form The current form. * @param array $feed The current APC feed. * * @since 1.2.8 * */ $auto_custom_fields = gf_apply_filters( array( 'gpml_auto_convert_custom_fields', $form['id'] ), $auto_custom_fields, $post_id, $entry, $form, $feed ); $mappings = rgars( $feed, 'meta/postMetaFields', array() ); foreach ( $mappings as $mapping ) { $key = $mapping['key'] == 'gf_custom' ? $mapping['custom_key'] : $mapping['key']; if ( ! in_array( $key, $auto_custom_fields ) ) { continue; } $field = GFAPI::get_field( $form, $mapping['value'] ); if ( ! $field || ! $this->is_applicable_field( $field ) ) { continue; } $value = $this->acf_get_field_value( 'id', $entry, $field, true ); if ( ! $value ) { continue; } if ( is_array( $value ) ) { $value = implode( ',', $value ); } update_post_meta( $post_id, $key, $value ); } }Do you think adding an action hook to the update post plugin, combined with duplicating the function call would work?
Something along the lines of:
‘add_action( ‘gform_postupdate_post_after_creation’, array( $this, ‘apc_custom_field_integration’ ), 10, 4 );’
https://www.loom.com/share/ba7f6b71b2a549b39d6e66dbc5f183d1
Thanks again 🙂
Hi Petrus,
Thanks for the quick reply. The issue is resolved in the 2.5.2 release. Awesome to hear the plugin dev is now in-house. I’ll be sure to share any other suggestions on how the plugin can be further improved.
Cheers,
ChrisForum: Plugins
In reply to: [AMP] Outputting terms from rest api into a amp-list selectHey Weston,
Sure, will do 🙂
Forum: Plugins
In reply to: [CMB2] Taxonomy terms not being set in repeatable field groupGotcha.
I tried updating the flavor_term field to the taxonomy_select field type, but that doesn’t seem to work in a repeatable field group, as all the values are set to the last one on save.
The other catch is that the flavors are set on the wine_style post type, which is outputted inside of the wine post type. Each wine has multiple styles, each with their own flavor profile, so I think I’m going to have to rethink my approach.
Thanks for your input 🙂
Forum: Plugins
In reply to: [CMB2] Taxonomy terms not being set in repeatable field groupHi Michael,
Thanks for taking the time to respond 🙂
That’s right. I figured using the taxonomy field types would have a two way sync, outputting as normal meta fields, but still associating the term with the post.
I considered adding a pivot table to handle the association, but that feels somewhat overkill, so I thought I’d check here first.
Cheers,
ChrisForum: Plugins
In reply to: [CMB2] Taxonomy terms not being set in repeatable field groupHere is a pastie of the code I’m using to add the flavors meta:
https://www.pastiebin.com/5b9fa70aac491Forum: Plugins
In reply to: [AMP] amp-analytics tracking not getting picked up by GANo probs. I just wanted to make sure it wasn’t something I was doing wrong in the GA json. Thanks anyways 🙂
Forum: Plugins
In reply to: [AMP] amp-analytics tracking not getting picked up by GAHey Weston,
Yeah, I’ve checked and triple checked. I am going to take a stab at implementing Google Tags manager with an AMP container and see if that helps.
Cheers,
ChrisForum: Plugins
In reply to: [AMP] AMP validation errors not getting cleared from error listHi Weston,
Thanks for taking a look 🙂
I managed to get around the html attributes issue by using the markup api in Beans to replace the value on the prefix attribute. I then rechecked the posts in the validation list, but all the issues with the og and http attributes are still there.
Would you mind sending me a copy of the alpha, so I can give that a try?
Cheers,
ChrisForum: Plugins
In reply to: [AMP] AMP validation errors not getting cleared from error list@westonruter Thank so much for responding so quickly – especially being weekend and all!
Firing up Slack now and will give you a ping.
Forum: Fixing WordPress
In reply to: How to remove WINDOW._SE_PLUGIN from WP_HEADGlad to hear it 😉
Forum: Themes and Templates
In reply to: The Pages Templates is not workingYou’re welcome 🙂 Glad that helped!
Forum: Themes and Templates
In reply to: Gap on right of homepage when viewed on mobileGlad to hear it 🙂
Forum: Themes and Templates
In reply to: The Pages Templates is not workingHi Hoasam,
First thing to try is clearing the cache in W3 Total Cache and if that doesn’t work, try disabling the plugin.
Cheers,
ChrisForum: Themes and Templates
In reply to: Gap on right of homepage when viewed on mobileHi moonunderground,
In your themes style.css, look for this section:
@media (max-width: 800px) { /* Simplify the basic layout */ #main #content { margin: 0 7.6%; width: auto; }and update the #main #content css with this:
#main #content { margin: 0 0 0 30px; width: 105%; }That should do the trick 🙂
Cheers,
Chris