<?php /** * Plugin Name: Ova Cars for ShopMagic */ use WPDesk\ShopMagic\Placeholder\Builtin\WooCommerceOrderBasedPlaceholder; add_action( 'shopmagic/core/placeholders', static function (array $placeholders) { $placeholders[] = new class extends WooCommerceOrderBasedPlaceholder { public function get_slug(): string { return parent::get_slug() . '.ovacrs_pickup_date'; } public function value( array $parameters = null ): string { // Are you sure, method `get_order_ovacars_pickup_date` exists? // Most likey, you will have instance of `\WC_Order` // inside this method. return $this->is_order_provided() ? $this->get_order()->get_order_ovacars_pickup_date() : ''; } } return $placeholders; } );