• Hello,

    The plug in was working well on the site but recently it has resulted in the custom field being show twice on every page it is intended for. In the settings there is only one field and not set to the same page twice.

    Can someone please advise.

    Thanks

    Jack

    The page I need help with: [log in to see the link]

Viewing 15 replies - 16 through 30 (of 31 total)
  • When was this update? I have still two fields LOL

    Hi guys,

    After updating Woocommerce and this plugin to the latest version, try checking the overridden template ‘single-product/add-to-cart/variable.php’. In my case, I had to update this template to remove (or comment) calling of these actions:

    do_action( 'woocommerce_before_add_to_cart_button' );

    and

    do_action( 'woocommerce_after_add_to_cart_button' );

    It appears that Woocommerce now adds those calls someplace else already, probably when rendering the actual cart button as part of action woocommerce_single_variation

    +1 on this issue, running latest versions of everything, with no template overrides in place. Curiously it’s only doing it on one product.

    hi! i am having this exact problem right now since last wordpress update. can anyone help me? how do i fix it?

    Hello,

    Same problem here. Everything is updated at latest version (Woo 3.4.3, WP 4.9.7, Apache/2.4.17, PHP/5.6.20, mySQL 5.5.5-10.1.13-MariaDB, WC Fields Factory 2.0.8, no template overrides in Woo.
    Tried everything. Any ideas?

    Thank you,
    Daniel

    Just wanted to let you all know this in my case it was a conflict with the WC Variations Radio Buttons plugin. When activated, the fields duplicate on variations product page.
    I’ve deactivated the conflicting plugin and it’s all good again.

    Sorry for the trouble.

    I am also experiencing this issue. I don’t want to go down the jQuery hack route. Is there going to be an official fix to this issue please?

    Plugin Contributor sarkparanjothi

    (@sarkparanjothi)

    Please update wcfields factory 3.0.0
    Still having same issue let me know

    Last night auto update broke the wordpress website.. trying to figure out how to fix this issue after the update. Anyone knows?

    Fatal error: Can’t use function return value in write context in /home4/domain/wp-content/plugins/wc-fields-factory/includes/wcff-dao.php on line 563

    Plugin Contributor sarkparanjothi

    (@sarkparanjothi)

    @ealbinom

    Please update your server php version or replace that entire method like

    public function update_field($_pid = 0, $_payload) {
    	    $_pid = absint( $_pid );
    	    $res  = true;
    	    $msg = "";
    	    $field_meta_key = "";
    	    $field_unopen = isset( $_payload["wcff_unopen_details"] ) ? $_payload["wcff_unopen_details"] : array();
    	    $_payload = isset( $_payload["wcff_field_metas"] ) ? $_payload["wcff_field_metas"] : array();
    	    for( $i = 0; $i < count( $_payload ); $i++ ){
    	        $payload = $_payload[$i];
    	        if ( isset( $payload[ "key" ] ) && $payload[ "key" ] != "" ) {
    	            $field_meta_key = $payload[ "key" ];
    	        } else {
    	            $field_meta_key = "";
    	        }
        		if( $res ){
        		    $check_not_empty = !empty( $field_meta_key ) && !empty( get_post_meta( $_pid, $field_meta_key, true ) );
        		    if( $check_not_empty ){
        		        $payload = apply_filters( 'wcff_before_update_field', $_payload[$i], $_pid );
        		        delete_post_meta( $_pid, $field_meta_key );
        		        if( add_post_meta( $_pid,  $field_meta_key, wp_slash( json_encode( $payload ) ) ) == false ) {
        		            $res = false;
        		            $msg = "Failed to update the custom field";
        		        }
            		} else {
            		    $res = $this->save_field( $_pid, $_payload[$i] );
            		    if( !$res ){
            		        $msg = "Failed to create custom field";
            		    }
            		}
        		}
    	    }
    	    
    	    foreach( $field_unopen as $key => $data ){
    	       $field_meta = get_post_meta( $_pid,  $key, true );
    	       $check_empty = !empty( $field_meta );
    	       if( $check_empty ){
    	           $field_meta_json = json_decode( $field_meta, true );
    	           foreach( $data as $meta_key => $meta_val ){
    	               $field_meta_json[$meta_key] = $meta_val;
    	           }
    	           delete_post_meta( $_pid, $key );
    	           if( add_post_meta( $_pid,  $key, wp_slash( json_encode( $field_meta_json ) ) ) == false ) {
    	               $res = false;
    	               $msg = "Failed to update the custom field";
    	           }
    	       }
    	    }
    	    return array( "res" => $res, "msg" => $msg );
    	}

    Update PHP version to what version?

    Plugin Contributor sarkparanjothi

    (@sarkparanjothi)

    Latest or after 6

    I am also experiencing the error with Variable Subscriptions and the Quantity count.

    I can see that the “wccpf_fields_clone_count” value increases with the quantity and decreases when the quantity is lowered, but the extra “wccpf-fields-group” divs don’t go away when the quantity is lowered.

    Things were still working on this as of Woocommerce 3.3.5, Woocommerce Subscriptions 2.2.18 and WC Fields Factory 2.0.8, but I really want to upgrade these plugins without the error.

    Thanks for the help!

    Plugin Contributor sarkparanjothi

    (@sarkparanjothi)

    @sweettea2 please check with wc fields factory 3.0.1

    Still not fixed for me. Using Ark Theme. Everything is updated. ??

    Any PHP dev want some easy money?

Viewing 15 replies - 16 through 30 (of 31 total)
  • The topic ‘Showing custom field twice’ is closed to new replies.