This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Set the admin user with the right permissions (replace with the actual username or user ID) | |
ADMIN_USER="shojib" | |
# Define the brand you want to filter by (adjust the value as needed) | |
BRAND="World Furniture" # You can set your brand name with spaces here | |
# Get all product IDs where the ACF field 'brand' equals the specified brand (handle spaces with quotes) | |
PRODUCT_IDS=$(wp post list --post_type=product --meta_key='brand' --meta_value="$BRAND" --format=ids --user=$ADMIN_USER) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Set the admin user with the right permissions (replace with the actual username or user ID) | |
ADMIN_USER="shojib" | |
CATEGORY_ID=2721 | |
PAGE=1 | |
PER_PAGE=90 | |
PRODUCT_IDS="" | |
# Loop to fetch all product IDs page by page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Boxtal\BoxtalConnectWoocommerce\Util\Order_Util; | |
use Boxtal\BoxtalConnectWoocommerce\Order\Controller; | |
// send email to custom with tracking number on order shipped | |
add_action('boxtal_connect_order_shipped', 'send_tracking_number', 10, 2); | |
function send_tracking_number($order_id) { | |
$order = wc_get_order($order_id); | |
$email = $order->get_billing_email(); |