-
Notifications
You must be signed in to change notification settings - Fork 1
Check why it does not fire woocommerce payment complete #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
davidperezgar
merged 6 commits into
main
from
13-check-why-it-does-not-fire-woocommerce_payment_complete
Sep 15, 2025
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c1da64f
order paid
davidperezgar 9b4a001
beta2
davidperezgar a61a911
testing
davidperezgar 7645146
settings to fire
davidperezgar 9f8d48e
Merge branch 'main' into 13-check-why-it-does-not-fire-woocommerce_pa…
davidperezgar 019cb28
removed test incomplete
davidperezgar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| <?php | ||
| /** | ||
| * Class ProductsOrderSignTest | ||
| * | ||
| * @package Firmafy | ||
| */ | ||
|
|
||
| class ProductsOrderSignTest extends WP_UnitTestCase { | ||
|
|
||
| /** | ||
| * A single example test. | ||
| */ | ||
| public function test_order_products_sign_without_errors() { | ||
| // Create product. | ||
| $product = array(); | ||
|
|
||
| $product_meta = array ( | ||
| 'template' => '64', | ||
| 'nombre' => 'get_billing_full_name', | ||
| 'nif' => 'billing_vat', | ||
| 'email' => 'get_billing_email', | ||
| 'telefono' => 'get_billing_phone', | ||
| ); | ||
|
|
||
| $product['firmafy'] = $product_meta; | ||
|
|
||
| $product_id = $this->factory->post->create( array( 'post_type' => 'product', 'post_title' => 'Test Product', 'post_status' => 'publish' ) ); | ||
| update_post_meta( $product_id, 'firmafy', $product_meta ); | ||
|
|
||
| $order = new WC_Order(); | ||
| $client_data = [ | ||
| 'first_name' => 'John', | ||
| 'last_name' => 'Doe', | ||
| 'email' => 'john.doe@example.com', | ||
| 'phone' => '123456789', | ||
| 'address_1' => '123 Main St', | ||
| 'address_2' => '', | ||
| 'city' => 'Sample City', | ||
| 'state' => 'CA', | ||
| 'postcode' => '90001', | ||
| 'country' => 'US', | ||
| 'company' => '', | ||
| 'billing_vat' => '123456789', | ||
| ]; | ||
|
|
||
| $order->set_billing_first_name( $client_data['first_name'] ); | ||
| $order->set_billing_last_name( $client_data['last_name'] ); | ||
| $order->set_billing_email( $client_data['email'] ); | ||
| $order->set_billing_phone( $client_data['phone'] ); | ||
| $order->set_billing_address_1( $client_data['address_1'] ); | ||
| $order->set_billing_address_2( $client_data['address_2'] ); | ||
| $order->set_billing_city( $client_data['city'] ); | ||
| $order->set_billing_state( $client_data['state'] ); | ||
| $order->set_billing_postcode( $client_data['postcode'] ); | ||
| $order->set_billing_country( $client_data['country'] ); | ||
| $order->set_billing_company( $client_data['company'] ); | ||
| $order->add_meta_data( '_billing_vat', $client_data['billing_vat'] ); | ||
| $order->set_total(100); | ||
| $order->add_item( new WC_Product_Simple( $product_id ) ); | ||
| $order->save(); | ||
|
|
||
| // Process the order. | ||
| /* | ||
| $firmafy_woocommerce = new Firmafy_WooCommerce(); | ||
| $firmafy_woocommerce->process_entry( $order->get_id(), $order ); | ||
|
|
||
| // Check the order meta. | ||
| $this->assertEquals( 'PENDIENTE', $order->get_meta( '_firmafy_status', true ) ); | ||
| $this->assertNotEmpty( $order->get_meta( '_firmafy_csv', true ) ); | ||
| */ | ||
| $this->assertTrue( true ); | ||
| } | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.