• Resolved florent2cdl

    (@florent2cdl)


    Hi,

    When I add a relation field (relation with another pod custom content) to a woocommerce product content type I’ve got bug and error.
    Steps to reproduce :
    – Create a Pod form woocommerce product content type.
    – Add a multiple relation to another content type (for me a new pod content type)
    – Use the ‘auto completion’ option for the multiple select field (select2 composant I think)

    So now, edit a product, go to the ‘attribute’ tab and click ‘add an custom attribut’ :
    It generates a javascript error :
    “Uncaught Error: Option ‘ajax’ is not allowed for Select2 when attached to a <select> element.”

    So I have to disable that pod field on woocommerce product to add my attributes on it.
    Thanks.
    Florent

Viewing 1 replies (of 1 total)
  • Plugin Contributor Scott Kingsley Clark

    (@sc0ttkclark)

    Are you using the latest version of WooCommerce?

    Also this code might help:

    
    /**
     * Disable enqueued Pods select2 and handlebars scripts
     * on WooCommerce product admin edit screens.
     *
     * @see https://github.com/pods-framework/pods/issues/3700
     */
    add_action( 'admin_footer', function(){
    
    	if ( 'product' === get_current_screen()->post_type ) {
    
    		wp_dequeue_style( 'pods-select2'  );
    		wp_dequeue_script( 'pods-select2' );
    		wp_dequeue_script( 'pods-handlebars' );	
    
    	}
    
    } );
    
Viewing 1 replies (of 1 total)
  • The topic ‘Bug : Relation field inside product (woocommerce)’ is closed to new replies.