Skip to content
WPCode Library

WPCode Library

Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!

Get WPCode
See all Features

  • Features
    • Code Snippets Library
    • Smart Conditional Logic
    • Advanced Code Revisions
    • Private Cloud Library
    • Marketing Scripts & Conversion Pixels
  • Pricing
  • Snippets Library
  • Help Center
    • Docs
    • Support
  • Blog
  • Login
  • Get WPCode

Snippets library

Browse Snippets
Claim your Free Profile
Add Snippet

Type: php

Adding a custom Order filter to the Orders export type

function custom_woo_ce_orders_filter_by_custom_meta() { // This is the Order meta key we want to filter Orders by $meta_key = ‘_shipping_postcode’; ob_start(); ?>Continue reading

Adding a custom Product filter to the Edit Scheduled Export screen

function custom_woo_ce_scheduled_export_products_filter_by_custom_meta( $post_ID = 0 ) { // This is the Product meta key we want to filter Products by $meta_key = ‘performance_date’; $custom_meta = get_post_meta( $post_ID, ‘_filter_product_custom_meta’, true ); ob_start(); ?>Continue reading

Override the imported image filename when dealing with dynamic URL’s and replace the file extension

function custom_woo_pd_get_filename_dynamic_filename( $output, $filename ) { // Check we are dealing with https://images.sample-domain.com/is/image/dynamic/products/… if( strpos( $filename, ‘images.sample-domain.com/is/image/dynamic/products’ ) !== false ) { $output = basename( $filename ); // Strip the filename down to the ? character $pos = strpos( $output,…Continue reading

Override the imported image filename when dealing with dynamic URL’s and replace the file extension

function custom_woo_pd_get_filename_dynamic_filename( $output, $filename ) { // Check we are dealing with https://images.sample-domain.com/is/image/dynamic/products/… if( strpos( $filename, ‘images.sample-domain.com/is/image/dynamic/products’ ) !== false ) { $output = basename( $filename ); // Strip the filename down to the ? character $pos = strpos( $output,…Continue reading

Show a unique Order Item row matching the Quantity value for each Order Item

function custom_woo_ce_order_items_individual_output( $output, $order, $order_item ) { if( !empty( $order->order_items ) ) { // Check the Order Item has a Product ID if( !empty( $order_item->product_id ) ) { // Multiply the Order Item by the Quantity value if( !empty( $order_item->quantity…Continue reading

Include Quantity and Cost details in TM Extra Product Options columns

add_filter( ‘woo_ce_enable_advanced_extra_product_options’, ‘__return_true’ );Continue reading

Override the default store XML node in exports

// Rename the default store node to Orders function custom_woo_ce_export_xml_store_node( $node = ” ) { return ‘Orders’; } add_filter( ‘woo_ce_export_xml_store_node’, ‘custom_woo_ce_export_xml_store_node’ );Continue reading

Override the default order_items XML node in exports

// Rename the default order_items to OrderLineItem function custom_woo_ce_export_xml_order_items_node( $node = ” ) { return ‘OrderLineItem’; } add_filter( ‘woo_ce_export_xml_order_items_node’, ‘custom_woo_ce_export_xml_order_items_node’ );Continue reading

Override the default order_items XML node in exports

// Rename the default order_items to OrderLineItem function custom_woo_ce_export_xml_order_items_node( $node = ” ) { return ‘OrderLineItem’; } add_filter( ‘woo_ce_export_xml_order_items_node’, ‘custom_woo_ce_export_xml_order_items_node’ ); ?>Continue reading

Modify the Order Items export to show individual Product quantity per row

function custom_woo_ce_order_items_individual_output( $output, $order, $order_item ) { if( !empty( $order->order_items ) ) { // Check the Order Item has a Product ID if( !empty( $order_item->product_id ) ) { // Multiply the Order Item by the Quantity value if( !empty( $order_item->quantity…Continue reading

Page navigation

Previous 1 … 256 257 258 259 260 … 488 Next

Company

  • About
  • Careers
  • Testimonials
  • Blog
  • Affiliates
  • Contact
  • Twitter
  • Facebook

Powerful Code Features

  • Ready-made Snippets Library
  • Smart Conditional Logic
  • Advanced Auto-insert Locations
  • Global Header & Footer Scripts
  • Safe Error Handling
  • WordPress Code Generators

  • Ecommerce Conversion Pixels
  • Dynamic Content Elements
  • Reduce Number of Plugins
  • Save Snippets in Cloud
  • Easy Code Management
  • Advanced Code Revisions

Helpful Links

  • Support
  • Documentation
  • Plans & Pricing
  • WordPress Hosting
  • Start a Blog
  • Make a Website

Copyright © 2025 WPCode. WPCode® is a registered trademark of WPCode, LLC

Terms of Service
Privacy Policy
FTC Disclosure
Sitemap
WPCode Coupon

The WordPress® trademark is the intellectual property of the WordPress Foundation. Uses of the WordPress®, names in this website are for identification purposes only and do not imply an endorsement by WordPress Foundation. WPCode is not endorsed or owned by, or affiliated with, the WordPress Foundation.

Snippet Preview