Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter frbaldutz

    (@frbaldutz)

    Hello (@rur165), i’ve cancel of function.php and i’ve insert in a new one the script. It doesn’t give me an error, but nothing appear in back end.

    It should appear the FulFillment Latency text box in my general tab in back end, but nothing appear.

    Probably a make some mistake. But where?
    Following the script i used

    // 1. Add FULFILLMENT LATENCY (General tab)

    add_action( ‘woocommerce_product_options_general_product_data’, ‘bbloomer_add_badge_checkbox_to_products1’ );

    function bbloomer_add_badge_checkbox_to_products1() {
    woocommerce_wp_text_input( array(
    ‘id’ => ‘fulfillment_latency’,
    ‘placeholder’ => ‘Fulfillment Latency’,
    ‘label’ => __(‘Fulfillment Latency’, ‘woocommerce’),
    ‘desc_tip’ => ‘true’
    )
    );
    }

    // —————————————–
    // 2. Save checkbox via custom field

    add_action( ‘save_post’, ‘bbloomer_save_badge_checkbox_to_post_meta1’ );

    function bbloomer_save_badge_checkbox_to_post_meta1( $product_id ) {
    if ( defined( ‘DOING_AUTOSAVE’ ) && DOING_AUTOSAVE )
    return;
    if ( isset( $_POST[‘fulfillment_latency’] ) ) {
    update_post_meta( $product_id, ‘fulfillment_latency’, $_POST[‘fulfillment_latency’] );
    } else delete_post_meta( $product_id, ‘fulfillment_latency’ );
    }

    // —————————————–
    // 3. Display badge @ single product page if checkbox checked
    add_action( ‘woocommerce_before_add_to_cart_quantity’, ‘bbloomer_display_badge_if_checkbox’, 16 );

    function bbloomer_display_badge_if_checkbox() {
    global $product;
    if ( get_post_meta( $product->get_id(), ‘fulfillment_latency’, true ) ) {

    echo ‘<div class=”woocommerce-message”>Shipping latency: ‘ . get_post_meta( $product->get_id(), ‘fulfillment_latency’)[0] . ‘ business days</div>’ ;
    }
    }

    Thread Starter frbaldutz

    (@frbaldutz)

    Hi @rur165, it doesn’t work.

    I’ve tried to replace all the third parts, but it doesn’t work.

    Thread Starter frbaldutz

    (@frbaldutz)

    Hi @3sonsdevelopment ,thanks for your help.
    I’ve tried to deactivate all plugins and i’ve also tried to change theme, but nothing change.
    It’s a strange situation. All the automatic emails were sent from my website, but not from my woocommerce.
    I can send email manually. It doesn’t sent only automatic email, but it’s very important for me.
    Do you have any ideas? I made a migration from another hosting. It could have caused this problem?
    I’ve contact hosting support. They told me that they doesn’t find any problem server side.

    Thread Starter frbaldutz

    (@frbaldutz)

    Just another question. I use wp all import plugin to import my product, but I can’t find year make model to update. How can I import my product with wp all import and update make model and year?

    Thread Starter frbaldutz

    (@frbaldutz)

Viewing 5 replies - 1 through 5 (of 5 total)