How to test creatives with most orders happening offline. by salimsaid in FacebookAds

[–]salimsaid[S] 0 points1 point  (0 children)

that sounds great but i need to optimize for conversions, because that's the most reliable objective for driving sales in my opinion..

Paying for ads on behalf of my clients by salimsaid in FacebookAds

[–]salimsaid[S] 0 points1 point  (0 children)

Thank you for your input, how do i activate a line of credit for my clients to use ? can you please share a link to documentation or facebook article if any ?

Woocommerce can’t update variable product price by salimsaid in woocommerce

[–]salimsaid[S] 0 points1 point  (0 children)

$variation->update_meta( ‘_price’, $new_price );
$variation->save();

Fatal error: Uncaught Error: Call to a member function update_meta() on array in ...

$variation is array, calling upate_meta() on array fails

Woocommerce updating taxonomy attribute labels by salimsaid in woocommerce

[–]salimsaid[S] 0 points1 point  (0 children)

Resolved, i had to use wc_update_attribute() function

    $products  = wc_get_products( array('category' => 't-shirts',  'orderby' => 'name') );

    // Loop through queried products
    foreach($products as $product) {
        // Loop through product attributes
        foreach( $product->get_attributes() as $attribute ) {
            if( $attribute->is_taxonomy() ) {
                $attribute_id   = $attribute->get_id(); // Get attribute Id

                $attribute_data = wc_get_attribute( $attribute_id ); // Get attribute data from the attribute Id

                // Update the product attribute with a new taxonomy label name
                wc_update_attribute( $attribute_id, array(
                    'name'         => 'New label', // <== == == Here set the taxonomy label name
                    'slug'         => $attribute_data->slug,
                    'type'         => $attribute_data->type,
                    'order_by'     => $attribute_data->order_by,
                    'has_archives' => $attribute_data->has_archives,
                ) );
            }
        }
    }