WordPress.org

Ready to get started?Download WordPress

Forums

AJAX Post Meta
[resolved] Adding ajax post meta functionality to Woocommerce (3 posts)

  1. pt1985
    Member
    Posted 1 year ago #

    Dear Brainstorm media,

    we are trying to use your AJAX Post Meta plugin with woocommerce but we cannot get it to work.
    If i am correct i should add the post type product to the post_types in the functions.php and the columns which need the direct edit function.
    But it does not work is there something i am doing wrong?
    I hope you can help me out.

    this is the code i have in functions.php

    // Ajax quick edit
    function my_ajax_meta_post_types( $post_types ) {
        // Add list of post types to any previously enabled.
        // To complete override, just return an array
        return wp_parse_args( array(
    		'product',
        ), $post_types );
    }
    add_filter('ajax_meta_post_types', 'my_ajax_meta_post_types');
    
    function my_ajax_meta_keys($keys) {
        // Array of meta keys to enable editing for
        return wp_parse_args( array(
    
            // General syntax
            // 'meta_key'       => __('Column Title'),
    		'code'       => __('Code'),
    		'Leverancier'       => __('leverancier'),
        ), $keys );
    }
    add_filter('ajax_meta_keys', 'my_ajax_meta_keys');

    Yours Truly,

    Patrick

    http://wordpress.org/extend/plugins/ajax-post-meta/

  2. Paul Clark
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for the detailed report and sample code, Patrick. It looks like a filter that was required for custom content types to work as missing. This should be fixed in the 1.0.1 update we just released.

  3. pt1985
    Member
    Posted 1 year ago #

    Hey pdclark,

    it's working perfectly.

    Thanks a lot for fixing this.

    This plugin is awesome.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic