Search results for filter

231 articles found

  • Scheduled Orders: Custom Field Next Occurrence Customization (Date Picker Example)

    Adjusts next_occurrence_date based on a custom field value (date picker example). Important: Always test customizations to your site on a staging environment before making changes to your live / produ

  • autoship_delete_general_payme​nt_method

    (src > payments.php) Calls function to delete a payment method in QPilot. Takes the token_id and token as parameters. Example /** * Calls the function to delete a payment method to QPilot * Based on T

  • Native UI: Customize Displayed Frequency Options

    Customizes the Frequency Options displayed by the Native UI to customers when editing a Scheduled Order within My Account > Scheduled Orders Important: Always test customizations to your site on a

  • autoship_get_product_default_relative_next_occurrence()

    (src/products.php) Used to get the Next Occurrence Date for a product. It returns the Next Occurrence string or null if it doesn't exist. It takes the following parameters: $product_id (integer)

  • autoship_add_to_scheduled_order_endpoint_redirect (function)

    ( src/pages.php) Sets Up the autoship Add to Scheduled Orders endpoint redirect. It takes the $redirect (url) and the logged in Wordpress $user as its parameters. Function /** * Sets Up the autoship

  • autoship_create_scheduled_order_endpoint_redirect (function)

    (src/pages.php) Sets Up the autoship Create to Scheduled Orders endpoint redirect.It takes the $redirect (url) and logged in (Wordpress) $user as its parameters. Function /** * Sets Up the autoship

  • Upsert Custom Site Metadata to QPilot

    In this example, a developer inserts custom site metadata to be stored in QPilot. This will update whenever a Scheduled Order processes. You can check QPilot Site metadata with an API client like

  • autoship_update_scheduled_order_h​andler (function)

    (src/scheduled-orders.php) Main handler for updates to Scheduled Orders for the Native UI. It takes the (Scheduled) $order_id, the $action, and the (Scheduled Order) $data as its parameters. Function

  • autoship_header_script_data

    (src/scripts.php) Within the autoship_head_scripts() function and can be used to add to or completely change the JS code we output to the head of the page. Example: ob_start(); ?><!-- Autoship Cloud

  • autoship_clean_logger_files

    ( src/logger.php) Within the the new autoship_log_entry() function and allows devs to enable / disable deletion of old log entries. Example // disable old log file deletion function

  • autoship_delete{$type}payment_method

    (src > payments.php) Part of the autoship_delete_general_payment_method function. Filters the boolean for if a method matches between WC and QPilot. Takes the 1. Boolean ( if there is a match using th

  • autoship_delete_gener​al_payment_method

    (src > payments.php) Part of the autoship_delete_general_payment_method function. Filters the boolean for if a Method matches between WC and QPilot. takes the 1. Boolean ( if there is a match using th

  • autoship_order_customer_dashboard_column_location

    (src/orders.php) Located within the autoship_order_customer_dashboard_icon_column() function and can be used to customize the location of the new Autoship column in the My Account > Orders screen.

  • autoship_populate_order_dashboard_icon_tooltip

    (src > orders.php) Modify the tooltip string to be displayed; takes the 1. current tooltip string, 2. the tooltip array, and the 3. WC_Order as parameters. Example function xx_change_tooltip_str($tool

  • autoship_keep_logger_files_count

    (src/logger.php) Allows devs to change the total number of log files kept at any one time. By default only 30 logs are kept at a time. Example: // increase days logger keeps records for to 40

  • autoship_frequency_cart_order_item_next_occurence_display_label

    (src/cart.php) Used to transform the text of the label for products with Relative Next Occurrence Dates. Takes the $date_label, $formatted_date, & $product_id as parameters. function

  • autoship_frequency_cart_order_item_schedule_display_label

    Can be used to customize the "Schedule" label found on a Scheduled Order's metadata and in the Cart items metadata displayed. Example // customize item label 'Schedule' to 'Subscribe' in cart function

  • autoship_lock_duration_restriction_notification

    (src > schedule-orders.php) Can be used to change the notification displayed to users for Scheduled Orders that are within the Lock period. Example // change Schedule Order lock message function xx_ne

  • autoship_plugin_custom_extensions

    (src > admin.php) Allows plugin authors should add their plugin to the extension list. Takes the 1. plugin file name ( with or without the php extension i.e. 'autoship' ) as an argument and adds it to

  • autoship_populate_order_customer_dashboard_icon_tooltip

    (src/orders.php) Within the autoship_order_customer_dashboard_icon_column_content() function and can be used to customize the tooltip html when hovering over the Autoship icons in the My Account >

  • Products: Display Notice When Stock Level is Below 3

    Dynamically display a user notice when stock is less than 3. Important: Always test customizations to your site on a staging environment before making changes to your live / production site.  If you a

  • Cart / Checkout: Free Shipping Based on Frequency and Type

    Conditionally remove Free Shipping as an option in the cart/checkout based on the values for Frequency and Frequency Type. Important: Always test customizations to your site on a staging environment b

  • Cart / Checkout: Autoship Free Shipping on Orders over $50

    In this example the merchant wants to only offer the Autoship Free Shipping option at checkout, when there are Autoship Items in the Cart and the Cart total is $50 or more. Example: /** * Calculate

  • autoship_log_entry (function)

    (src/logger.php) Used to add log files to the Autoship Log. Takes the source for the entry ($context) and the Log message ($message) as parameters. Function /** * Add a log entry. * * @param string

  • autoship_get_schedulable_products_script_data (function)

    ( src/scheduled-orders.php) Used to output the product information for adding to Scheduled Orders. Code /** * Outputs the Product Infor for Adding to Order * * @return string The html output */

  • autoship_create_menu()

    (src/admin.php) Adds the main Autoship Cloud Options page & adds the subpages to WP-Admin. These include the Native Wordpress Autoship > Settings pages and the following embedded QPilot pages:

  • autoship_override_simple_frequency_options_default

    (src > product-options.php) Allows you to override the default setting for the Overrode Defaults frequency option for both Simple products. Takes the current setting and the product or variation ids.

  • autoship_admin_settings_tab_include_submit

    (src/admin.php) used to show or hide the Update button from each tab in the Autoship Cloud > Settings page. Takes a boolean ($show) and the current settings tab ($active_tab) as parameters. Example

  • autoship_get_product_sync_summary

    (src/products.php) Function used to get and use QPilot's API response from syncing a product. Takes a product id as a parameter.  Example /** * Retrieves the product summary from QPilot for the suppli

  • autoship_edit_scheduled_order_action_button_skin

    (src > scheduled-orders.php) Allows you to add/change the classes assigned to the buttons in order to change the look and feel of the ui. Example // Customize action button skin and span function xx_c

  • autoship_override_variable_frequency_options_default

    (src > product-options.php) Allows you to override the default setting for the Overrode Defaults frequency option for Variable products. Takes the current setting and the product or variation ids. Exa

  • Scheduled Orders: Change Next Occurrence if Date Falls on Weekend

    If the Scheduled Order's next_occurence_date falls on a weekend, moves the next_occurence_date to Monday.  Important: Always test customizations to your site on a staging environment before making cha

  • Code Example: Calculate the Autoship Discount Based on Sale Price

    (src/products.php) In this example the dev changes the displayed discount percentage on product pages relative to the (WooCommerce) sale price of an item (if one exists). /** * Adjust Autoship

  • autoship_qpilot_orders_update_via_rest_convert_fees_to_coupons (function)

    ( src/coupons.php) Preprocesses a QPilot Order to remove fee lines that will be added as a virtual coupon so taxes and totals are correctly applied. Takes the $original_request and the (current)

  • autoship_orders_form_row_notice_skin

    (templates > scheduled-orders > order-row-notice-template.php) Can be used to adjust/customize the classes used on the different html elements in the orders-row-notice-template. Example function xx_ch

  • autoship_include_scheduled_orders_row_notice

    Can be used to control if the orders-row-notice-template should be included by default to display the Notification for scheduled orders in the table on the Scheduled Orders screen. Takes a boolean (wh

  • autoship_admin_settings_submenu_pages

    (src > admin.php) Can be used to add additional submenu pages to the Autoship Cloud menu. Takes the $submenus array as a parameter.  Example // add submenu to autoship admin tab function add_submenu($

  • autoship_log_entry

    (src/logger.php) Within the the new autoship_log_entry() function and allows devs to disable logging based on context and / or error message or disable Autoship logs completely. /** * Add a log

  • autoship_get_remote_site_settings (function)

    (src/admin.php) Used to get the current site settings from QPilot. Function /** * Gets the current sites Settings from QPilot. * @param bool $sitehealth Optional. The current API Health flag. */

  • autoship_print_variable_product_custom_fields (function)

    (src/product-page.php) Outputs custom fields of a variable product. Takes $loop, $variation_data, and $variation as parameters. Function /** * Outputs the HTML for the Autoship custom fields for

  • autoship_logs_directory_path

    (src/logger.php) Within the autoship_get_logs_directory() function, and allows devs to specify the location of the logs directory. By default the log directory path will be set to a autoship-logs

  • autosh​ip_product_autos​hip_tab_content (function)

    (src/product-page.php) Outputs the Autoship data tab in the WooCommerce Edit Product Screen. Function /** * Outputs the Autoship data tab in the WooCommerce Edit Product Screen * @see

  • autoship_add_cart_item (function)

    ( src/cart/php) Adjust the price of new items being added to the cart based on their schedule, so it only fires if the item being aded is NEW and doesn't exist already. NOTE This filters data after

  • autoship_admin_settings_tabs

    (src > admin.php) Can be used to add additional tabs to the Autoship Cloud > Settings page. It can also be used to remove tabs from the same page. Takes the $tabs array as a parameter. Example //

  • autoship_create_scheduled_order_item_product_price

    Can be used to modify the regular price for an order, and takes the following parameters: Price Frequency Frequency Type WC Product object as parameters. Example // change product price based on more

  • How do I make sure QPilot notifications are not sent to spam?

    Sometimes, automated email notifications from QPilot, Autoship Cloud's hosted service, will be immediately sent to SPAM. One of the simple tricks to prevent emails from landing in your spam folder is

  • URL: Add to Scheduled Order Link Use Restriction

    Prevent a user from being able to click an Add to Schedule Link more than once. Important: Always test customizations to your site on a staging environment before making changes to your live / product

  • autoship_create_scheduled_order_item_product_sale_price

    ( src > orders.php ) Can be used to modify the sale price (recurring price) for a product on a Scheduled Order and takes the following parameters Price Frequency Frequency Type WC Product object as

  • URL: Display Text Offer To User If the Add to Schedule Link Has Been Clicked

    Display custom text (an offer) to a user if the Add to Schedule Link has already been clicked by the user. Important: Always test customizations to your site on a staging environment before making cha

  • autoship_generate_virtual_wc_coupon (function)

    ( src/coupons.php) Used to generate a new WooCommerce Virtual Coupon given supplied data. Takes $coupon_data as its parameter and returns a new WooCommerce Virtual Coupon. Function: /** * Generates a