| | |
| | | */ |
| | | protected function getVariationMapping(string $post_type): array |
| | | { |
| | | $registrar = Registrar::getInstance($post_type)); |
| | | $registrar = Registrar::getInstance($post_type); |
| | | if (!$registrar) { |
| | | return []; |
| | | } |
| | |
| | | */ |
| | | protected function getFieldMapping(string $post_type): array |
| | | { |
| | | $registrar = Registrar::getInstance($post_type)); |
| | | $registrar = Registrar::getInstance($post_type); |
| | | if (!$registrar) { |
| | | return []; |
| | | } |
| | |
| | | } |
| | | |
| | | $meta->setAll($updates); |
| | | $meta->save(); |
| | | |
| | | // Trigger notification to customer if order is ready |
| | | if ($state === 'PREPARED') { |
| | |
| | | |
| | | // Save all values at once |
| | | $meta->setAll($values_to_save); |
| | | $meta->save(); |
| | | } |
| | | |
| | | /** |
| | |
| | | 'created_at' => current_time('mysql'), |
| | | 'updated_at' => current_time('mysql') |
| | | ]); |
| | | $meta->save(); |
| | | |
| | | // Index by Square order ID for quick webhook lookups |
| | | update_option(BASE . 'square_order_map_' . $order_data['square_order_id'], $order_post_id); |